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

Figure out how to handle median and moving window median #1

Open
shoyer opened this issue Oct 28, 2014 · 0 comments
Open

Figure out how to handle median and moving window median #1

shoyer opened this issue Oct 28, 2014 · 0 comments

Comments

@shoyer
Copy link
Collaborator

shoyer commented Oct 28, 2014

Bottleneck uses an array copy to do median, and accesses array elements with an integer indexer, requiring 1d input. I suppose we can do a copy if we allow the start of the gufunc to drop out of nopython mode, but it would be unfortunate to only be able to support aggregating over single axes at once. On the other hand, numpy doesn't have no-copy support for aggregating over multiple axes at once, either, and np.nanmedian finally arrived in numpy 1.9. If Numbagg won't be much faster, there may be no point in supplying either median or nanmedian ourselves.

move_median is even trickier. Bottleneck uses a C library that implements an appropriate data structure. Pandas has its own Cython code for an efficient data structure. In principle, I support we could interface with C from Numba to do this in Numbagg, but that is not so elegant.

Insight or ideas from others would be greatly appreciated here :).

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

No branches or pull requests

1 participant