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 b873691 commit ccf00eaCopy full SHA for ccf00ea
src/zarr/core/codec_pipeline.py
@@ -413,6 +413,12 @@ async def _read_key(
413
if chunk_array is None:
414
chunk_array_batch.append(None) # type: ignore[unreachable]
415
else:
416
+ # The operation array_equal operation below effectively will force the array
417
+ # into memory.
418
+ # if the result is useful, we want to avoid reading it twice
419
+ # from a potentially lazy operation. So we cache it here.
420
+ # If the result is not useful, we leave it for the garbage collector.
421
+ chunk_array._data = np.asarray(chunk_array._data)
422
if not chunk_spec.config.write_empty_chunks and chunk_array.all_equal(
423
fill_value_or_default(chunk_spec)
424
):
0 commit comments