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 NaN and missing detection in quantile() #72

Merged
merged 1 commit into from
Mar 24, 2021
Merged

Conversation

nalimilan
Copy link
Member

When sort=false, we only partially sort the input, so NaN/missing is not guaranteed to be in the last position. Also avoid throwing errors for non-Number types, for which isnan may not be defined.

Partially supersedes https://github.com/JuliaLang/Statistics.jl/pull/54/. Relies on JuliaLang/julia#38232 to ensure that isnan works for any type (but before things were even worse).

When `sort=false`, we only partially sort the input, so `NaN`/`missing`
is not guaranteed to be in the last position. Also avoid throwing errors for
non-`Number` types, for which `isnan` may not be defined.
@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      #72   +/-   ##
=========================================
  Coverage          ?   83.11%           
=========================================
  Files             ?        1           
  Lines             ?      456           
  Branches          ?        0           
=========================================
  Hits              ?      379           
  Misses            ?       77           
  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...ca8369d. Read the comment docs.

Copy link

@mkborregaard mkborregaard left a comment

Choose a reason for hiding this comment

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

great

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