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
sparse + dask array not supported #5259
Comments
What do you think would be the right approach here? Call Currently we have this code, which seems problematic: Lines 1106 to 1110 in 6f38240
I wonder if just removing that check would make things work |
I think probably adding a |
Xarary defines __array_ufunc__, so that wouldn't be enough. Dask needs to
defer to xarray, but handle sparse arrays itself. I don't know if there's a
good way to do that without an explicit list of valid or invalid "array
chunk types".
…On Mon, Aug 12, 2019 at 6:48 AM Hameer Abbasi ***@***.***> wrote:
I think probably adding a `hasattr(..., '*array_ufunc*') would help here.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5259?email_source=notifications&email_token=AAJJFVVTDWXY2MOJU2XHYITQEFSZTA5CNFSM4IK5QBXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4CSSZA#issuecomment-520431972>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJJFVWRCWNCCUNN5YV7VHLQEFSZTANCNFSM4IK5QBXA>
.
|
Maybe there needs to be a way to declare something as “ndarray-compatible”, this has come up before. |
Right, but remember that other "ndarray-compatible" arrays might need to wrap dask arrays. For example, if someone wrote a duck type compatible version of autograd. |
We call |
yes, though with overriding numpy ufuncs we still have to be careful to explicitly skip types like xarray.DataArray |
Wouldn’t autograd be wrapped by Dask Array instead? |
This is what I'm hoping the xref: numpy/numpy#13831 (for others interested in learning more) |
cc @hameerabbasi
dask+sparse works, but not sparse+dask.
I think dask should probably implement this case, via it's
__array_ufunc__
method. Here's the traceback:The text was updated successfully, but these errors were encountered: