-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
KeyError
in Group.__getitem__
for zarr_format=2
#2275
Comments
Ah I see the potential issue: the Group is opened with
So probably not a bug. |
For top level stuff like |
I think the current implementation does a good job with auto-discovery when reading. The problem with my snippet is that the If the store had already had a (v2) Group then this works: In [1]: import zarr
In [2]: store = zarr.store.MemoryStore(store_dict={}, mode="w")
In [3]: zarr.open_array(store=store, shape=(4,), path="foo", zarr_format=2)
Out[3]: <Array memory://4537150336/foo shape=(4,) dtype=float64>
In [4]: zarr.open_group(store, zarr_format=2) # create the v2 Group
Out[4]: Group(_async_group=<AsyncGroup memory://4537150336>)
In [5]: zarr.open_group(store)["foo"] # read the v2 Group (relying on zarr_format inference)
Out[5]: <Array memory://4537150336/foo shape=(4,) dtype=float64> So maybe this question here is to what extent we want to support hierarchies with a mixture of Zarr V2 and Zarr V3 nodes. That makes my head hurt a little bit, but I guess it's doable (don't assume that |
I think we want no support for this. IMO, a v3 group with a v2 array as a member should not be expressible in |
Explicit |
Zarr version
v3
Numcodecs version
na
Python Version
na
Operating System
na
Installation
na
Description
In zarr-v2, you could create an array at a
path
and access it via a group:Steps to reproduce
In zarr v3, this raises a KeyError:
Additional output
No response
The text was updated successfully, but these errors were encountered: