zarr-developers / zarr-specs

Zarr core protocol for storage and retrieval of N-dimensional typed arrays
https://zarr-specs.readthedocs.io/
Creative Commons Attribution 4.0 International
88 stars 28 forks source link

chunk key encoding: `c` prefix for 0-dimensional arrays #282

Open d-v-b opened 11 months ago

d-v-b commented 11 months ago

can someone help me understand the behavior of 0-dimensional arrays with the default chunk key encoding?

The spec states:

Arrays may have 0 dimensions (when for example representing scalars), in which case the coordinate of a chunk is the empty tuple, and the chunk key will consist of the string c.

I interpret this to mean that c is a prefix / directory for 1+dimensional arrays, but c is an object / file for 0 dimensional arrays, which seems strange. Why did we move away from the behavior in V2 (a 0D array has 1 chunk, named 0)?