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] Scatter Plot Graph: crash on metas column with all 0 values #2775

Merged
merged 1 commit into from
Nov 15, 2017
Merged

[FIX] Scatter Plot Graph: crash on metas column with all 0 values #2775

merged 1 commit into from
Nov 15, 2017

Conversation

jerneju
Copy link
Contributor

@jerneju jerneju commented Nov 14, 2017

Issue

Scaling does not stack metas with other arrays when metas array has all values set to zero.

Description of changes

Another check for metas array.

Includes
  • Code changes
  • Tests
  • Documentation

@jerneju jerneju modified the milestones: 3.7.1, 3.8 Nov 14, 2017
@codecov-io
Copy link

codecov-io commented Nov 14, 2017

Codecov Report

Merging #2775 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2775      +/-   ##
==========================================
- Coverage   76.08%   76.07%   -0.02%     
==========================================
  Files         338      338              
  Lines       59717    59720       +3     
==========================================
- Hits        45438    45433       -5     
- Misses      14279    14287       +8

@lanzagar lanzagar merged commit c5d1861 into biolab:master Nov 15, 2017
@jerneju jerneju deleted the spg-metas-fix branch November 15, 2017 14:49
@markotoplak
Copy link
Member

I do not understand why was this needed. As far as I know, numpy hstack works with zeros as well.

On a related note, what would happen if X had an attribute that was all zeros?

@lanzagar
Copy link
Contributor

Exactly, that is why now everything is hstacked and it should work no matter what kind of metas there are.
Before, there was an if condition if np.any(data.metas): which not only failed for no metas, but also for all-zero metas, in which case they were not hstacked at all. (Probably the if should have checked if data.domain.metas) But no idea why the if was necessary at all...

@markotoplak
Copy link
Member

My stupidity, I read this patch backwards. :D

nikicc pushed a commit to nikicc/orange3 that referenced this pull request Nov 17, 2017
[FIX] Scatter Plot Graph: crash on metas column with all 0 values
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