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] Rank: fixes creating Table with infinite numbers #2168

Merged
merged 2 commits into from
Apr 7, 2017
Merged

[FIX] Rank: fixes creating Table with infinite numbers #2168

merged 2 commits into from
Apr 7, 2017

Conversation

jerneju
Copy link
Contributor

@jerneju jerneju commented Mar 30, 2017

Issue

Sometimes Rank calculates infinite values. Those cannot be put in Table.
https://sentry.io/biolab/orange3/issues/222918568/

Includes
  • Code changes
  • Tests
  • Documentation

@jerneju
Copy link
Contributor Author

jerneju commented Mar 30, 2017

@codecov-io
Copy link

codecov-io commented Mar 30, 2017

Codecov Report

Merging #2168 into master will decrease coverage by 0.81%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2168      +/-   ##
==========================================
- Coverage   71.44%   70.63%   -0.82%     
==========================================
  Files         268      318      +50     
  Lines       53093    54515    +1422     
==========================================
+ Hits        37932    38505     +573     
- Misses      15161    16010     +849

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 54d8498...07ea1b1. Read the comment docs.

@@ -685,6 +685,7 @@ def create_scores_table(self, labels):
# Reshape to 2d array as Table does not like 1d arrays
feature_names = feature_names[:, None]

scores = np.nan_to_num(np.array(scores, dtype=np.float64))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scores was created a couple of lines higher and is already a np.array. Why not specify dtype at creation?

@astaric astaric added this to the 3.4.2 milestone Apr 7, 2017
@lanzagar lanzagar merged commit d8f444b into biolab:master Apr 7, 2017
@jerneju jerneju deleted the value-rank branch April 24, 2017 15:01
@jerneju
Copy link
Contributor Author

jerneju commented Jun 6, 2017

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