Skip to content

v3 from_array() does not persist chunks correctly #111

@dstansby

Description

@dstansby
import zarr
from pydantic_zarr.v3 import ArraySpec

arr = zarr.create_array(
    store={},
    shape=(64, 64, 64),
    dtype="float32",
    chunks=(16, 16, 16),
)
print(arr.chunks)
# (16, 16, 16)

spec = ArraySpec.from_array(arr)
print(spec.chunk_grid)
# {'name': 'regular', 'configuration': {'chunk_shape': (64, 64, 64)}}

I would expect the last line to have the same chunks as the earlier array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions