Skip to content

Commit 8f40aaf

Browse files
committed
add array copy for array view
1 parent e410173 commit 8f40aaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/zarr/core/codec_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def _merge_chunk_array(
315315
# TODO: For the last chunk, we could have is_complete_chunk=True
316316
# that is smaller than the chunk_spec.shape but this throws
317317
# an error in the _decode_single
318-
return chunk_value
318+
return chunk_value.copy() # make a writable copy
319319
if existing_chunk_array is None:
320320
chunk_array = chunk_spec.prototype.nd_buffer.create(
321321
shape=chunk_spec.shape,

0 commit comments

Comments
 (0)