zarr-python icon indicating copy to clipboard operation
zarr-python copied to clipboard

`Array.dimension_names` property

Open sehoffmann opened this issue 1 month ago • 2 comments

Describe the new feature you'd like

The newly introduced dimension_names metadata can, at the moment, only be accessed via array.metadata.dimension_names. Parameters passed to zarr.create like shape or chunks can afterwards often be accessed as properties of Array. Hence, it would be consistent (and convenient) to have a Array.dimension_names property.

sehoffmann avatar Nov 21 '25 09:11 sehoffmann

the reason for this state is the fact that zarr v2 arrays do not have dimension names. there are a few ways we could address this, but the simplest is probably to set dimension_names to None for zarr v2 arrays. This is consistent with the zarr v3 dimension_names attribute.

d-v-b avatar Nov 21 '25 09:11 d-v-b

I agree. Setting it to None in that case would be the sensible choice in my opinion.

sehoffmann avatar Nov 21 '25 10:11 sehoffmann