You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Public API for determining if an array is sharded #4036
Similar to #4035, it would simplify downstream use-cases to have a clear method that indicates if an array uses sharding.
Currently, one can use .shards is not None for regular chunk grids, but must use a try/except for sharded + rectilinear grids since the return type of .shards cannot express rectilinear grids.
we could expose the ChunkLayout. When inner is None, no sharding codec is being used. We would need to update this to accommodate any new codecs that implement sharding.
we could expose the ChunkLayout. When inner is None, no sharding codec is being used. We would need to update this to accommodate any new codecs that implement sharding.
would it be better to expose ChunkLayout via Zarr's regular API or a metadata package?
I don't think it belongs in a metadata package, since it's something we invented for an internal representation in zarr-python. it's basically a distillation of the chunk grid + codecs for an array, so it's could be useful as an attribute on array metadata, or on the array itself. we might need to polish it a bit, e.g. changing field names
I don't think it belongs in a metadata package, since it's something we invented for an internal representation in zarr-python. it's basically a distillation of the chunk grid + codecs for an array, so it's could be useful as an attribute on array metadata, or on the array itself. we might need to polish it a bit, e.g. changing field names
makes sense.
A ChunkLayout attribute could be a logical place to solve #4035 as well.
Activity
d-v-b commentedon Jun 4, 2026
we could expose the
ChunkLayout. WheninnerisNone, no sharding codec is being used. We would need to update this to accommodate any new codecs that implement sharding.maxrjones commentedon Jun 4, 2026
would it be better to expose
ChunkLayoutvia Zarr's regular API or a metadata package?d-v-b commentedon Jun 4, 2026
I don't think it belongs in a metadata package, since it's something we invented for an internal representation in zarr-python. it's basically a distillation of the chunk grid + codecs for an array, so it's could be useful as an attribute on array metadata, or on the array itself. we might need to polish it a bit, e.g. changing field names
maxrjones commentedon Jun 4, 2026
makes sense.
A ChunkLayout attribute could be a logical place to solve #4035 as well.