8000 MAINT: cleanups to quantile by eric-wieser · Pull Request #16274 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

MAINT: cleanups to quantile #16274

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 2 commits into from
May 17, 2020
Merged

Conversation

eric-wieser
Copy link
Member

There's a log of noisy reshaping going on here that just gets in the way of seeing the algorithm.

Inspired by #15098 and #16273

The `add` ufunc is happy to handle `out=None` by itself
It's easier to move the relevant axis to position 0 in `ap` first than it is to move it for every relevant object simultaneously.
Copy link
Member
@seberg seberg left a comment

Choose a reason for hiding this comment

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

LGTM, feel free to merge. The np.add() out kwarg will cause a slight slowdown for small arrays, but I think we should probably not care.
I guess the moveaxis call could really be moved all the way up to after the ap definition, so that the whole function basically works on axis=0...

@eric-wieser eric-wieser merged commit a6b4b2b into numpy:master May 17, 2020
@eric-wieser
Copy link
Member Author

I guess the moveaxis call could really be moved all the way up to after the ap definition, so that the whole function basically works on axis=0...

I have some more local changes to do just that :)

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