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

Support axis/axes/keepdims in apply_gufunc() #3843

Closed
shoyer opened this issue Aug 2, 2018 · 3 comments
Closed

Support axis/axes/keepdims in apply_gufunc() #3843

shoyer opened this issue Aug 2, 2018 · 3 comments
Labels

Comments

@shoyer
Copy link
Member

shoyer commented Aug 2, 2018

As of NumPy 1.15, NumPy's generalized ufuncs now support axis/axes/keepdims arguments:
https://docs.scipy.org/doc/numpy/release.html#generalized-ufuncs-now-accept-axes-axis-and-keepdims-arguments

It would be nice to support these in dask.array.apply_gufunc(), too. This would be useful for implementing functions like median (#3819).

@shoyer shoyer mentioned this issue Aug 2, 2018
4 tasks
@mrocklin
Copy link
Member

mrocklin commented Aug 2, 2018

cc @magonser

@shoyer
Copy link
Member Author

shoyer commented Aug 2, 2018

One design decision to consider is whether axis/axes should be passed on to the wrapped functions (which might require numpy 1.15), or if we should simply do the axis reordering/insertion on the dask side.

I would lean towards the later since it isn't much more difficult, and imposes fewer requirements on the wrapped function. It's similar to what we currently do in xarray.apply_ufunc().

@jakirkham jakirkham added the array label Aug 2, 2018
@magonser
Copy link
Contributor

magonser commented Aug 5, 2018

I'd be happy to get my hands on it - though won't get to it before Sep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants