We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
#3117 by @nvictus introduces support for sparse in plain xarray. dask already supports it.
Running with:
>>> import numpy, sparse, xarray, dask.array >>> s = sparse.COO(numpy.array([1, 2])) >>> da1 = dask.array.from_array(s) >>> da1._meta <COO: shape=(0,), dtype=int64, nnz=0, fill_value=0> >>> da1.compute() <COO: shape=(2,), dtype=int64, nnz=2, fill_value=0> >>> da2 = xarray.DataArray(s).chunk().data >>> da2._meta array([], dtype=int64) # Wrong >>> da2.compute() RuntimeError: Cannot convert a sparse array to dense automatically. To manually densify, use the todense method.
The text was updated successfully, but these errors were encountered:
I'm pretty sure this is what breaks things:
xarray/xarray/core/variable.py
Lines 939 to 945 in befc72f
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
#3117 by @nvictus introduces support for sparse in plain xarray.
dask already supports it.
Running with:
The text was updated successfully, but these errors were encountered: