Skip to content

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

Merged
lanzagar merged 2 commits into
biolab:masterfrom
jerneju:value-rank
Apr 7, 2017
Merged

[FIX] Rank: fixes creating Table with infinite numbers#2168
lanzagar merged 2 commits into
biolab:masterfrom
jerneju:value-rank

Conversation

@jerneju
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

jerneju commented Mar 30, 2017

@codecov-io
Copy link
Copy Markdown

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.

Comment thread Orange/widgets/data/owrank.py Outdated
# 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
Copy Markdown
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
Copy Markdown
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