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

chunk sparse arrays #3202

Merged
merged 7 commits into from
Aug 12, 2019
Merged

chunk sparse arrays #3202

merged 7 commits into from
Aug 12, 2019

Conversation

crusaderky
Copy link
Contributor

Closes #3191

@shoyer I completely disabled wrapping in ImplicitToExplicitIndexingAdapter for sparse arrays, cupy arrays, etc.
I'm not sure if it's desirable; the chief problem is that I don't think I understand the purpose of ImplicitToExplicitIndexingAdapter to begin with... some enlightenment would be appreciated.

@crusaderky crusaderky self-assigned this Aug 11, 2019
ac = a.chunk(2)
assert ac.chunks == ((2, 2),)
assert isinstance(ac.data._meta, sparse.COO)
assert_identical(ac, a)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shoyer After #3204, assert_identical(a, ac) does not work anymore - not even with the latest sparse git head

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this is due to dask/dask#5259

@crusaderky
Copy link
Contributor Author

Ready for final review and merge

Copy link
Member

@shoyer shoyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Feel free to merge after tests pass

@crusaderky crusaderky changed the title WIP: chunk sparse arrays chunk sparse arrays Aug 12, 2019
@crusaderky
Copy link
Contributor Author

@shoyer NEP18 and type annotations feel like two groundbreaking changes to me. Shall we call the next version to 0.13.0 instead of just 0.12.4?

@shoyer
Copy link
Member

shoyer commented Aug 12, 2019

@shoyer NEP18 and type annotations feel like two groundbreaking changes to me. Shall we call the next version to 0.13.0 instead of just 0.12.4?

Sounds pretty reasonable to me!

@shoyer
Copy link
Member

shoyer commented Aug 12, 2019

I don't think we're quite ready to release 0.13 today -- NEP-18 support could probably use a bit more polish. But we're pretty close.

@crusaderky crusaderky merged commit c782637 into pydata:master Aug 12, 2019
@crusaderky crusaderky deleted the sparse_dask branch August 12, 2019 21:02
dcherian added a commit to dcherian/xarray that referenced this pull request Aug 14, 2019
* upstream/master:
  chunk sparse arrays (pydata#3202)
  Annotations for .data_vars() and .coords() (pydata#3207)
  Remove duck_array_ops.as_like_arrays() (pydata#3204)
  Match mypy version between CI and pre-commit hook (pydata#3203)
  BUG fix +test .sel method gives error with float32 values (pydata#3153)
  fix precommit file (pydata#3201)
  Enforce mypy compliance in CI (pydata#3197)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataArray.chunk() from sparse array produces malformed dask array
2 participants