-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
Support combo of advanced and basic indexing #2486
Comments
This is a combination of "advanced indexing" or "vectorized indexing" along axes 0, 1 and basic indexing on axis 2. Looking at the code this is not supported (yet). You're going to have expand the slice manually:
|
@dcherian So I guess I don't really mind one way or another whether it's supported, it's more that I would like to know what is supported and is not somehow. Is there some document somewhere or the like? I would expect "we replicate numpy indexing" to be the answer but it apparently is not. https://github.com/ilan-gold/zarrs-python/blob/main/tests/test_pipeline.py has a nice suite of test - by expanding the >2d axis index types, there are a number of failures, and I don't know if they're bugs or not (not including some Ellipsis indexing issues in 2D I found as well: https://github.com/ilan-gold/zarrs-python/blob/bde5e3b9c800d21a2db2dd3d00430ee2f8cbfde3/tests/conftest.py#L69-L94?). I didn't want to post every failure because it's a lot and I don't know if they are bugs or not. |
Discussed in #2485
Originally posted by ilan-gold November 12, 2024
Hello,
I am not entirely clear about what is supported and what isn't in zarr indexing, especially in v3. I understand https://zarr.readthedocs.io/en/stable/tutorial.html#advanced-indexing as "the API is different because we explicitly implement oindex but otherwise the behavior should be the same as numpy."
In other words, it seems "coordinate indexing" ->
vindex
(or just normal bracket shortcutting on the array directly) and "orthogonal indexing" ->oindex
.But other than these things, I'm not sure I understand what is and isn't supported. For example
This is on zarr v3
3.0.0b1
. Is this a bug? Is there any good documentation on this?The text was updated successfully, but these errors were encountered: