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] statistics.utils: Fix stats for sparse when last column missing #1432

Merged
merged 1 commit into from
Jul 15, 2016

Conversation

nikicc
Copy link
Contributor

@nikicc nikicc commented Jul 8, 2016

np.bincount has a length of the maximal element and can hence be shorter than the number of columns (e.g. when some of the last columns have all zeros). This forces it to count non zero elements for all columns.

@codecov-io
Copy link

codecov-io commented Jul 8, 2016

Current coverage is 87.93%

Merging #1432 into master will not change coverage

@@             master      #1432   diff @@
==========================================
  Files            77         77          
  Lines          7582       7582          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           6667       6667          
  Misses          915        915          
  Partials          0          0          

Sunburst

Powered by Codecov. Last updated by 1ba45c1...ff2a5b4

@astaric
Copy link
Member

astaric commented Jul 15, 2016

Could you add a test for this?

`np.bincount` has a length of the maximal element and can hence be shorter than the number of columns (e.g. when some of the last columns have all zeros). This forces it to count non zero elements for all columns.
@nikicc
Copy link
Contributor Author

nikicc commented Jul 15, 2016

Test was added 😄

@kernc kernc merged commit dc8cc2c into biolab:master Jul 15, 2016
@nikicc nikicc deleted the sparse-fixups branch July 15, 2016 08:40
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