-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
apply_raw() for a simpler version of apply_ufunc() #1618
Comments
Would something like the following use case be covered by def f(a, b, c):
'''
inputs: 3 1D Numpy arrays of differing lengths
outputs: 1 1D Numpy array like `a`
'''
new = a + b.sum() + c.min() # just an example using all three
return new The current |
@jhamman you could do that core dimensions, e.g., |
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here or remove the |
More related discussion: #1074 (comment) |
apply_raw()
would work likeapply_ufunc()
, but without the hard to understand broadcasting behavior and core dimensions.The rule for
apply_raw()
would be that it directly unwraps its arguments and passes them on to the wrapped function, without any broadcasting. We would also include adim
argument that is automatically converted into the appropriateaxis
argument when calling the wrapped function.Output dimensions would be determined from a simple rule of some sort:
drop_dims
argument (likedask.array.map_blocks
), or require an explicit overrideoutput_dims
.This also could be suitable for defining as a method instead of a separate function. See #1251 and #1130 for related issues.
The text was updated successfully, but these errors were encountered: