Skip to content

v3 arrays have no .chunks attribute #1925

Closed
@rabernat

Description

@rabernat

Similar to: #1924

V2 arrays have a .chunks attribute: https://zarr.readthedocs.io/en/stable/_autoapi/zarr.core.Array.html#zarr.core.Array.chunks

V3 arrays don't:

import zarr
arr = zarr.Array.create(store=zarr.store.MemoryStore(), shape=(10,), chunks=(5,), dtype="i4")
arr.chunks
# -> attribute error

# instead it is available at
arr.metadata.chunk_grid.chunk_shape

It would be a pretty disruptive API change to remove this. I understand that the ChunkGrid concept makes this more complicated to support. We should reimplement a sane default for this attribute for regular chunk grids. So much code likely relies on this parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions