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

fix: selection with zarr arrays #2137

Merged
merged 7 commits into from
Sep 24, 2024

Conversation

jhamman
Copy link
Member

@jhamman jhamman commented Aug 28, 2024

This is a partial solution to #2133. It works but does so in a potential suboptimal way -- materializing the entire indexer before indexing. A deeper solution would include streaming indexer chunks from the selector to oindex/vindex but I think that can wait until later.

closes #2133

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/tutorial.rst
  • Changes documented in docs/release.rst
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@jhamman jhamman requested a review from normanrz August 28, 2024 19:38
Comment on lines 37 to 39
Selector = (
BasicSelector | ArrayOfIntOrBool | Array
) # help! we want zarr.Array[np.intp] | zarr.Array[np.bool_]
Copy link
Member Author

Choose a reason for hiding this comment

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

@dstansby and @normanrz - I believe we want something like I've written here but am not clear if we can do this yet. Any ideas?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see a technical reason why it isn't possible to make Array a generic type over data types.

Copy link
Member Author

Choose a reason for hiding this comment

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

happy to do this, can you point me in the right direction?

Copy link
Member Author

Choose a reason for hiding this comment

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

@dstansby - I feel that you are going to be best positioned to do flesh out the generic Array type. Do you have time to take that on?

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably not (at least in the next month) :(

@jhamman jhamman added the V3 Affects the v3 branch label Sep 13, 2024
src/zarr/core/indexing.py Outdated Show resolved Hide resolved
Co-authored-by: Davis Bennett <davis.v.bennett@gmail.com>
src/zarr/core/indexing.py Show resolved Hide resolved
src/zarr/core/indexing.py Show resolved Hide resolved
@jhamman jhamman merged commit 5e57f75 into zarr-developers:v3 Sep 24, 2024
25 of 26 checks passed
@jhamman jhamman mentioned this pull request Oct 9, 2024
6 tasks
@jhamman jhamman added this to the 3.0.0.beta milestone Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V3 Affects the v3 branch
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[v3] SyncError: Calling sync() from within a running loop
4 participants