Skip to content

Latest commit

 

History

History
1 lines (1 loc) · 1.15 KB

4376.bugfix.md

File metadata and controls

1 lines (1 loc) · 1.15 KB

Chunk specifications are judged only by the chunk normalizer: the separate duck-typed check for rectilinear input is gone, so the Zarr format 2 and sharding restrictions apply to what the normalized grid says was declared. A chunk size is an integer by Python's integer protocol: numpy integer scalars and 0-d integer arrays are accepted wherever a chunk or shard shape is. The legacy zarr.create(..., zarr_format=2) no longer tests the truth value of a numpy array given as chunks, so numpy arrays work there. A non-integer scalar chunk specification raises a TypeError naming the problem. An explicit list of chunk edges declares a rectilinear dimension everywhere, including a stored rectilinear chunk grid passed as chunks= whose edges happen to be uniform, so the Zarr format 2 and sharding restrictions treat it the same whether it is given as lists or as metadata, and zarr.create stores it as a rectilinear chunk grid, as create_array does. A RectilinearChunkGridMetadata made only of bare integers declares no explicit edge list, so it is read as the regular grid it describes: it is accepted for Zarr format 2 and as the chunk shape of a sharded array.