Skip to content

MAINT: cleanups to quantile#16274

Merged
eric-wieser merged 2 commits intonumpy:masterfrom
eric-wieser:extract-lerp
May 17, 2020
Merged

MAINT: cleanups to quantile#16274
eric-wieser merged 2 commits intonumpy:masterfrom
eric-wieser:extract-lerp

Conversation

@eric-wieser
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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