We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8817ba commit 30e59e3Copy full SHA for 30e59e3
py/ngff_zarr/to_ngff_zarr.py
@@ -988,8 +988,12 @@ def to_ngff_zarr(
988
# Get the chunks - these are now the shards if sharding is enabled
989
chunks = tuple([c[0] for c in arr.chunks])
990
991
- # For TensorStore, shards are the same as chunks when sharding is enabled
992
- shards = chunks if chunks_per_shard is not None else None
+ # For TensorStore, calculate shards based on chunks_per_shard when sharding is enabled
+ shards = (
993
+ tuple(c // s for c, s in zip(chunks, chunks_per_shard))
994
+ if chunks_per_shard is not None
995
+ else None
996
+ )
997
998
# Determine write method based on memory requirements
999
if memory_usage(image) > config.memory_target and multiscales.scale_factors:
0 commit comments