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
xarray.dot is now based on da.einsum #2089
Conversation
# subscripts should be passed to np.einsum as arg, not as kwargs. We need | ||
# to construct a partial function for parallelized computation. | ||
func = functools.partial(np.einsum, subscripts) | ||
# to construct a partial function for apply_ufunc to work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we explicitly raise an informative error (maybe NotImplementedError
) if any inputs are wrapping dask arrays and the version of dask is too old? Or maybe we could put that in duck_array_ops.einsum
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
E AttributeError: module 'dask.array' has no attribute 'einsum': requires dask >=0.17.3
It looks like the dot tests are now failing on Let's wait until that happens (hopefully very soon: dask/dask#3452) before merging this. But we should also add a conditional version check for
(The appveyor failures should be fixed if you merge in master.) |
@shoyer integrated your suggestion |
thanks @crusaderky ! |
Closes #2074
Requires dask >= 0.17.3