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 detection of NaN in median() #73

Merged
merged 2 commits into from
Mar 24, 2021
Merged

Fix detection of NaN in median() #73

merged 2 commits into from
Mar 24, 2021

Conversation

nalimilan
Copy link
Member

There is no reliable way to know only from the array eltype whether entries support isnan or not. Better leave to the compiler to optimize out the isa Number check when possible.

This works thanks to isnan(::Number) added by JuliaLang/julia#38232.

There is no reliable way to know only from the array eltype whether entries
support `isnan` or not. Better leave to the compiler to optimize out the
`isa Number` check when possible.
@codecov
Copy link

codecov bot commented Feb 13, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@05f09fe). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #73   +/-   ##
=========================================
  Coverage          ?   97.68%           
=========================================
  Files             ?        1           
  Lines             ?      388           
  Branches          ?        0           
=========================================
  Hits              ?      379           
  Misses            ?        9           
  Partials          ?        0           

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 05f09fe...90c32c2. Read the comment docs.

@nalimilan nalimilan closed this Mar 24, 2021
@nalimilan nalimilan reopened this Mar 24, 2021
@nalimilan nalimilan requested a review from ararslan March 24, 2021 14:48
@nalimilan nalimilan merged commit ba24318 into master Mar 24, 2021
@nalimilan nalimilan deleted the nl/nanmedian branch March 24, 2021 19:54
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.

2 participants