[FIX] SOM: Fix crash when color is constant#5860
Merged
VesnaT merged 3 commits intobiolab:masterfrom Mar 14, 2022
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5860 +/- ##
=======================================
Coverage 86.29% 86.29%
=======================================
Files 315 315
Lines 66793 66815 +22
=======================================
+ Hits 57638 57659 +21
- Misses 9155 9156 +1 |
c38d639 to
a10f06a
Compare
Contributor
Contributor
Author
Mostly this. :) https://github.com/biolab/orange3/blob/master/Orange/widgets/unsupervised/owsom.py#L574 But also another place. |
VesnaT
reviewed
Feb 25, 2022
Orange/widgets/unsupervised/owsom.py
Outdated
| missing_colors = \ | ||
| Msg("Some data instances have undefined value of '{}'.") | ||
| no_defined_colors = \ | ||
| Msg("'{}' has node defined values.") |
b215c7f to
ecc7355
Compare
Contributor
ecc7355 to
c00df78
Compare
Contributor
Author
This problem was actually in Which, by the way, reminds me: all widget should use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Issue
Fixes #5858.
If the variable determining the color was constant, the binning set two thresholds, which were both removed, thus creating an empty list of thresholds and labels. This created problems later in the code.
Description of changes
Set a threshold and label.
Includes