10000 BUG: Fixes for ma.median and nanpercentile. by juliantaylor · Pull Request #8372 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: Fixes for ma.median and nanpercentile. #8372

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

Merged
merged 5 commits into from
Dec 13, 2016

Conversation

juliantaylor
Copy link
Contributor

backport gh-8364 and gh-8366 to 1.12.x branch and release note entry on ma.median change

This requires to base masked median on sort(endwith=False) as we need to
distinguish Inf and NaN.
Using Inf as filler element of the sort does not work as then the mask is not
guaranteed to be at the end.
Closes numpygh-8340

Also fixed 1d ma.median not handling np.inf correctly, the nd variant
was ok.
Python 3.6 gets more strict about escape sequences, \. is invalid.
As it could get a syntax error the version check would not work.
The apply_along_axis path is significantly more expensive than currently
accounted for in the check. Increase the minimum axis size from 400 to
1000 elements.
Either apply_along_axis got more expensive over time or the original
benchmarking was flawed.
@charris charris changed the title Median backports BUG: Fixes for ma.median and nanpercentile. Dec 12, 2016
@charris charris added this to the 1.12.0 release milestone Dec 12, 2016
@charris charris merged commit e442bd1 into numpy:maintenance/1.12.x Dec 13, 2016
@charris
Copy link
Member
charris commented Dec 13, 2016

Thanks again @juliantaylor .

@juliantaylor juliantaylor deleted the median-backports branch December 13, 2016 18:47
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
0