Skip to content

Commit 74db438

Browse files
committed
Avoid memory copy in local store write
1 parent 9e8b50a commit 74db438

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/zarr/storage/_local.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ def _put(
5151
if start is not None:
5252
with path.open("r+b") as f:
5353
f.seek(start)
54-
f.write(value.as_numpy_array().tobytes())
54+
f.write(value.as_numpy_array())
5555
return None
5656
else:
57-
view = memoryview(value.as_numpy_array().tobytes())
57+
view = memoryview(value.as_numpy_array())
5858
if exclusive:
5959
mode = "xb"
6060
else:

0 commit comments

Comments
 (0)