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

BUG: Fix nanpercentile ignoring the dtype of all-nan arrays #19863

Merged
merged 4 commits into from
Sep 13, 2021

Conversation

BvB93
Copy link
Member

@BvB93 BvB93 commented Sep 11, 2021

Follow up on #19854.

While expanding the nan<x> test suite I noticed that nanpercentile (and nanquantile) would ignore the initial arrays dtype whenever encountering all-nan arrays, always returning a float64 instead.

Besides the bug fix, the test coverage of the nan<x> functions has been improved for testings involving all-nan arrays,
the relevant tests now being parametrized w.r.t. the array dtype, dimensionality and axis.

@BvB93 BvB93 changed the title BUG: Fixed an issue wherein nanpercentile would ignore the dtype for all-nan arrays BUG: Fixed an issue wherein nanpercentile would ignore the dtype of all-nan arrays Sep 11, 2021
Parametrize w.r.t. the axis, array dimensionality and dtype
@charris charris changed the title BUG: Fixed an issue wherein nanpercentile would ignore the dtype of all-nan arrays BUG: Fix nanpercentile ignoring the dtype of all-nan arrays Sep 11, 2021
@charris
Copy link
Member

charris commented Sep 13, 2021

LGTM apart from the ids.

BvB93 and others added 2 commits September 13, 2021 22:29
Co-Authored-By: Charles Harris <charlesr.harris@gmail.com>
@charris charris merged commit e4f85b0 into numpy:main Sep 13, 2021
@charris
Copy link
Member

charris commented Sep 13, 2021

Thanks Bas.

@BvB93 BvB93 deleted the nanquantile branch September 14, 2021 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants