[FIX] owcorrespondence: Handle variables with one value#2066
[FIX] owcorrespondence: Handle variables with one value#2066astaric merged 1 commit intobiolab:masterfrom jerneju:indexerror-owcorrespondence
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2066 +/- ##
=========================================
+ Coverage 69.93% 70.14% +0.2%
=========================================
Files 315 315
Lines 53979 54001 +22
=========================================
+ Hits 37752 37878 +126
+ Misses 16227 16123 -104Continue to review full report at Codecov.
|
| if data is not None: | ||
| self.varlist[:] = [var for var in data.domain.variables | ||
| if var.is_discrete] | ||
| if var.is_discrete and len(var.values) > 1] |
There was a problem hiding this comment.
This only filters out variables with less than 2 values.
A variable can have 3 values, but after selecting a subset only instances with 1 will remain.
This widget will still crash.
There was a problem hiding this comment.
Yes, I get "SVD did not converge" error.
|
When a PR is ready for review and merging, please try to give it a good name (that can appear in a Changelog) - the python error from the bug is not the most informative. |
Errors thrown: 1. IndexError: index 1 is out of bounds for axis 1 with size 1 2. SVD did not converge 3. Must specify at least one of rect, xRange, or yRange. (gave rect=<class 'NoneType'>) Problems caused by: 1) Domain has a two or more discrete variables but less than in a table 2) There is at least one NaN value in a column.
Issues
Check that the widget does not crash when domain has a discrete variable with only one value.
Description of changes
Discrete variables with only one value are not taken into account.
Includes