Skip to content

Commit b629474

Browse files
thewtexCopilot
andauthored
BUG: Fix previous_codecs sharding_codec addition
Using the append() method returns None, which results in sharding_kwargs['codecs'] being set to None instead of a list containing the new codec. Consider replacing this with 'previous_codecs + [sharding_codec]' or appending to previous_codecs and then assigning it directly. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 9214506 commit b629474

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ngff_zarr/to_ngff_zarr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def to_ngff_zarr(
317317
sharding_codec = ShardingCodec(chunk_shape=c0)
318318
if "codecs" in kwargs:
319319
previous_codecs = kwargs.pop("codecs")
320-
sharding_kwargs["codecs"] = previous_codecs.append(sharding_codec)
320+
sharding_kwargs["codecs"] = previous_codecs + [sharding_codec]
321321
else:
322322
sharding_kwargs["codecs"] = [sharding_codec]
323323
arr = arr.rechunk(shards)

0 commit comments

Comments
 (0)