Skip to content

Commit b2b9351

Browse files
thewtexCopilot
andauthored
Update py/ngff_zarr/to_ngff_zarr.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 30e59e3 commit b2b9351

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

py/ngff_zarr/to_ngff_zarr.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,10 +552,11 @@ def _handle_large_array_writing(
552552
codecs_kwargs = {}
553553

554554
if sharding_kwargs:
555-
if "_shard_shape" in sharding_kwargs:
555+
sharding_kwargs_copy = sharding_kwargs.copy()
556+
if "_shard_shape" in sharding_kwargs_copy:
556557
# For Zarr v3, configure sharding as a codec only
557-
shard_shape = sharding_kwargs.pop("_shard_shape")
558-
internal_chunk_shape = sharding_kwargs.get(
558+
shard_shape = sharding_kwargs_copy.pop("_shard_shape")
559+
internal_chunk_shape = sharding_kwargs_copy.get(
559560
"chunk_shape"
560561
) # This is the inner chunk shape
561562

0 commit comments

Comments
 (0)