Skip to content

Commit db37fed

Browse files
committed
try again
1 parent afb8fff commit db37fed

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/zarr/core/codec_pipeline.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,9 @@ async def _read_key(
416416
if chunk_array is None:
417417
chunk_array_batch.append(None) # type: ignore[unreachable]
418418
else:
419-
if not chunk_spec.config.write_empty_chunks:
419+
if chunk_spec.config.write_empty_chunks:
420+
chunk_array_batch.append(chunk_array)
421+
else:
420422
# The operation array_equal operation below effectively will force the array
421423
# into memory.
422424
# if the result is useful, we want to avoid reading it twice
@@ -429,8 +431,9 @@ async def _read_key(
429431
if chunk_array.all_equal(
430432
fill_value_or_default(chunk_spec)
431433
):
432-
chunk_array = None
433-
chunk_array_batch.append(chunk_array)
434+
chunk_array_batch.append(None)
435+
else:
436+
chunk_array_batch.append(chunk_array)
434437

435438
chunk_bytes_batch = await self.encode_batch(
436439
[

0 commit comments

Comments
 (0)