da.from_zarr ignores Zarr's dimension_separator
See original GitHub issueWhat happened:
Zarr arrays that have been stored with “/” as the dimension_separator attribute (in .zarray) have no data in them when opened with da.from_zarr. See https://github.com/zarr-developers/zarr-python/pull/715
What you expected to happen:
All Zarr stores in the zarr-python repository were updated in https://github.com/zarr-developers/zarr-python/pull/716 to read this new metadata. The two options I can think of are either using a full store like FSStore in from_zarr or adding support for dimension_separator directly.
cc: @martindurant
Minimal Complete Verifiable Example:
import zarr as zr
import dask.array as da
z = zr.storage.FSStore(
"foo.zarr",
dimension_separator="/",
auto_mkdir=True,
mode="w",
)
a = zr.creation.array(store=z, data=[range(4) for x in range(4)])
# Passes
base = da.from_zarr(z, "")
m = base.max().compute()
assert m == 3, m
# Fails
base = da.from_zarr("foo.zarr")
m = base.max().compute()
assert m == 3, m
Anything else we need to know?:
Originally reported in: https://github.com/zarr-developers/zarr-python/pull/709#issuecomment-834118324
Environment:
- Dask version: 2021.5.0
- Python version: 3.9.4
- Operating System: OSX 11.2.3
- Install method (conda, pip, source):
conda create -n dask dask zarr fsspec
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

OK, so when that’s in, I’ll fix dask. It will simply pass all arguments to zarr and have exactly the same behaviour.
https://pypi.org/project/zarr/2.9.0/ is released, @martindurant