Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

### Bug fixes

- Fix `HDFParser` failing on HDF5 datasets with a zero-length dimension under `zarr-python >= 3.2.0`, which forbids zero-length chunk dimensions. Chunk dimensions are now clamped to a minimum of 1 when falling back from dataset shape.
By [Tom Nicholas](https://github.com/TomNicholas).

### Documentation

### Internal changes
Expand Down
5 changes: 4 additions & 1 deletion virtualizarr/parsers/hdf/hdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ def _construct_manifest_array(
-------
ManifestArray
"""
chunks = dataset.chunks or dataset.shape
# Clamp each dim to >= 1: zarr v3 allows shape=(0,) but forbids zero-length
# chunk dimensions (enforced by zarr-python >= 3.2.0). See
# https://github.com/zarr-developers/zarr-python/issues/3711.
chunks = dataset.chunks or tuple(max(s, 1) for s in dataset.shape)
codecs = codecs_from_dataset(dataset)
attrs = _extract_attrs(dataset)
dtype = dataset.dtype
Expand Down
Loading