Skip to content

[FIX] ScatterPlot Crashes on Data With Infinity Values#2709

Merged
markotoplak merged 2 commits intobiolab:masterfrom
jerneju:spg-inf
Oct 27, 2017
Merged

[FIX] ScatterPlot Crashes on Data With Infinity Values#2709
markotoplak merged 2 commits intobiolab:masterfrom
jerneju:spg-inf

Conversation

@jerneju
Copy link
Copy Markdown
Contributor

@jerneju jerneju commented Oct 24, 2017

Issue

Fixes # #2684 .

Description of changes
Includes
  • Code changes
  • Tests
  • Documentation

@jerneju jerneju requested a review from nikicc October 24, 2017 10:00
@codecov-io
Copy link
Copy Markdown

codecov-io commented Oct 24, 2017

Codecov Report

Merging #2709 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2709      +/-   ##
==========================================
+ Coverage   76.02%   76.03%   +<.01%     
==========================================
  Files         338      338              
  Lines       59604    59615      +11     
==========================================
+ Hits        45315    45328      +13     
+ Misses      14289    14287       -2

@jerneju jerneju added this to the 3.7 milestone Oct 24, 2017
self.original_data = np.hstack((data.X, Y)).T
self.scaled_data = no_jit = self.original_data.copy()
self.valid_data_array = ~np.isnan(no_jit)
self.valid_data_array = ~np.isnan(no_jit) & ~np.isinf(no_jit)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.valid_data_array = np.isfinite(no_jit)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

def data_one_column_infs(cls):
table = cls.data_one_column_nans()
table.X[:, 1] = np.inf
return table
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could extend data_one_column_nans() into data_one_column_vals(value=np.nan) and call as data_one_column_vals(np.inf).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

@markotoplak markotoplak merged commit 587f811 into biolab:master Oct 27, 2017
@jerneju jerneju deleted the spg-inf branch October 27, 2017 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants