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] heatmap: Do not crash on all zero column #2916

Merged
merged 1 commit into from
Feb 23, 2018

Conversation

astaric
Copy link
Member

@astaric astaric commented Feb 20, 2018

Issue

Heatmap with column clustering crashes when data contains a column an all-zero column.
Column clustering is done using Pearson distance which is nan for a column of all zeros.

Description of changes

Convert non-finite values to finite using np.nan_to_num. This results in zero feature being clustered with a random other feature, but the rest of the clustering should make sense.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov-io
Copy link

Codecov Report

Merging #2916 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master   #2916      +/-   ##
=========================================
+ Coverage    82.1%   82.1%   +<.01%     
=========================================
  Files         328     328              
  Lines       56262   56268       +6     
=========================================
+ Hits        46194   46201       +7     
+ Misses      10068   10067       -1

@rokgomiscek rokgomiscek self-requested a review February 23, 2018 09:21
@lanzagar lanzagar changed the title heatmap: do not crash on all zero column [FIX] heatmap: Do not crash on all zero column Feb 23, 2018
@rokgomiscek rokgomiscek merged commit d4550ea into biolab:master Feb 23, 2018
@lanzagar lanzagar added this to the 3.11 milestone Feb 26, 2018
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