-
-
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] OWMosaic: Fix crash for attribute with no values #1941
Conversation
Current coverage is 89.53% (diff: 100%)@@ master #1941 diff @@
==========================================
Files 90 90
Lines 9179 9180 +1
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 8218 8219 +1
Misses 961 961
Partials 0 0
|
Not sure how to test this. What I tried was adding a discrete variable with all missing values (using feature constructor) and using that in mosaic. It still crashed, but it might be a different problem. |
Looks like that is another problem. To test this use an existing dataset with feature with all missing values, since the problem occurred when the variable's "values" is empty. |
"Feature {} has no values".format(attrs[0]), | ||
(self.canvas_view.width() - 120) / 2, | ||
self.canvas_view.height() / 2) | ||
return |
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.
I would put this before if
, that is, fail in both cases, with Pearson or with class distribution. The visualization does not make sense if any attribute has no values.
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.
"Class variable {} has no values".format(class_var), | ||
(self.canvas_view.width() - 140) / 2, | ||
self.canvas_view.height() / 2) | ||
return |
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.
And then you can remove this.
I am merging this, but two bugs in Mosaic still remain (unrelated to this PR): |
[FIX] OWMosaic: Fix crash for attribute with no values (cherry picked from commit 2801c12)
Issue
Fixes #1940
Description of changes
Includes