Zarr version
v3
Numcodecs version
n/a
Python Version
n/a
Operating System
n/a
Installation
n/a
Description
I'm looking into some of the xarray tests, and noticed this strange(?) change from V2. It seems like zarr.open_array with path="a" will write the data to a/a/, so that the metadata is at key a/a/zarr.json. I would have expected it to be at a/zarr.json. Is this expected?
Steps to reproduce
# v3
import zarr
import shutil
shutil.rmtree("/tmp/data.zarr", ignore_errors=True)
store = zarr.store.LocalStore(root="/tmp/data.zarr", mode="w")
a = zarr.open_array(store=store, path="a", shape=(4,))
b = zarr.open_array(store=store, path="b", shape=(4,))
[x async for x in store.list()]
gives
['a/a/zarr.json', 'b/b/zarr.json']
and the arrays must be opened with zarr.open_array(store=store, path="a/a").
Contrast that with V2, where you have
import zarr
store = "/tmp/v2.zarr"
a = zarr.open_array(store=store, path="a", shape=(4,))
b = zarr.open_array(store=store, path="b", shape=(4,))
g = zarr.open_group("/tmp/v2.zarr")
list(g.array_keys())
give ['a', 'b'] and you open the arrays with zarr.open_array(store=store, path="a").
Additional output
No response
Zarr version
v3
Numcodecs version
n/a
Python Version
n/a
Operating System
n/a
Installation
n/a
Description
I'm looking into some of the xarray tests, and noticed this strange(?) change from V2. It seems like
zarr.open_arraywithpath="a"will write the data toa/a/, so that the metadata is at keya/a/zarr.json. I would have expected it to be ata/zarr.json. Is this expected?Steps to reproduce
gives
and the arrays must be opened with
zarr.open_array(store=store, path="a/a").Contrast that with V2, where you have
give
['a', 'b']and you open the arrays withzarr.open_array(store=store, path="a").Additional output
No response