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

Implement boolean array indexing #73

Open
tomwhite opened this issue Aug 2, 2022 · 2 comments
Open

Implement boolean array indexing #73

tomwhite opened this issue Aug 2, 2022 · 2 comments

Comments

@tomwhite
Copy link
Member

tomwhite commented Aug 2, 2022

https://data-apis.org/array-api/latest/API_specification/indexing.html#boolean-array-indexing

The output has a data-dependent output shape, and it's difficult to implement since each chunk can be an arbitrary size, yet Zarr doesn't support non-regular chunk sizes.

It may be simplest to wait until non-regular chunking is available in Zarr 3.0 before doing this. There's a sketch of how this might be implemented here: zarr-developers/zarr-specs#49 (comment)

Using Zarr 3.0 non-regular chunking could be an implementation detail, by ensuring that it is only used for intermediate data, and that the final output is always a Zarr 2.0 array with regular chunking - at least until Zarr 3.0 is more widely supported.

@tomwhite
Copy link
Member Author

tomwhite commented Aug 2, 2022

Implementing nonzero and the unique_* functions (https://github.com/tomwhite/cubed/blob/main/api_status.md) also need support for non-regular chunking.

@hammer
Copy link

hammer commented Sep 29, 2022

It looks like Xarray does not yet have this feature either? pydata/xarray#1887

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants