Skip to content

Commit 62ce735

Browse files
d-v-bclaude
andcommitted
fix: cast ChunksTuple elements to int at consumer sites in array.py
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 796a564 commit 62ce735

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/zarr/core/array.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ async def _create(
478478
outer_chunks = guess_chunks(shape, item_size)
479479
else:
480480
outer_chunks = normalize_chunks_nd(_raw, shape)
481-
_chunks = tuple(dim[0] for dim in outer_chunks)
481+
_chunks = tuple(int(dim[0]) for dim in outer_chunks)
482482

483483
if order is None:
484484
order_parsed = config_parsed.order
@@ -4462,7 +4462,7 @@ async def init_array(
44624462
meta = AsyncArray._create_metadata_v2(
44634463
shape=shape_parsed,
44644464
dtype=zdtype,
4465-
chunks=tuple(dim[0] for dim in outer_chunks),
4465+
chunks=tuple(int(dim[0]) for dim in outer_chunks),
44664466
dimension_separator=chunk_key_encoding_parsed.separator,
44674467
fill_value=fill_value,
44684468
order=order_parsed,
@@ -4481,7 +4481,7 @@ async def init_array(
44814481
grid = create_chunk_grid_metadata(outer_chunks)
44824482
codecs_out: tuple[Codec, ...]
44834483
if inner is not None:
4484-
inner_chunks_flat = tuple(dim[0] for dim in inner.outer_chunks)
4484+
inner_chunks_flat = tuple(int(dim[0]) for dim in inner.outer_chunks)
44854485
index_location = None
44864486
if isinstance(shards, dict):
44874487
index_location = ShardingCodecIndexLocation(shards.get("index_location", None))

0 commit comments

Comments
 (0)