diff --git a/docs/releases.md b/docs/releases.md index 6f3be737..b6594a04 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -10,6 +10,9 @@ ### Bug fixes +- Fix handling of scalar Zarr V3 arrays with None dimension_names. + ([#897](https://github.com/zarr-developers/VirtualiZarr/pull/897)). + By [Lars Buntemeyer](https://github.com/larsbuntemeyer). - Fix setting `fill_value` for Zarr V2 arrays if data type is a subtype of integer or float. ([#845](https://github.com/zarr-developers/VirtualiZarr/pull/845)). By [Hauke Schulz](https://github.com/observingClouds). diff --git a/virtualizarr/manifests/array.py b/virtualizarr/manifests/array.py index 967ea986..0c0b0564 100644 --- a/virtualizarr/manifests/array.py +++ b/virtualizarr/manifests/array.py @@ -280,7 +280,7 @@ def to_virtual_variable(self) -> xr.Variable: # The xarray data model stores dimension names and arbitrary extra metadata outside of the wrapped array class, # so to avoid that information being duplicated we strip it from the ManifestArray before wrapping it. - dims = self.metadata.dimension_names + dims = self.metadata.dimension_names or () attrs = self.metadata.attributes stripped_metadata = utils.copy_and_replace_metadata( self.metadata, new_dimension_names=None, new_attributes={}