Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Oct 27, 2017
Merged

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

merged 2 commits into from
Oct 27, 2017

Conversation

jerneju
Copy link
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

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
@@ -49,7 +49,7 @@ def _compute_scaled_data(self):
Y = data.Y if data.Y.ndim == 2 else np.atleast_2d(data.Y).T
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
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
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
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
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