-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Conversation
Codecov Report
@@ 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 |
Orange/widgets/utils/scaling.py
Outdated
@@ -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) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Orange/widgets/tests/base.py
Outdated
def data_one_column_infs(cls): | ||
table = cls.data_one_column_nans() | ||
table.X[:, 1] = np.inf | ||
return table |
There was a problem hiding this comment.
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)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
Issue
Fixes # #2684 .
Description of changes
Includes