Skip to content

Commit 5b2e6f1

Browse files
jhammanTomNicholas
andauthored
fix(zarr): use inplace array.resize for zarr 2 and 3 (#9673)
Co-authored-by: Tom Nicholas <[email protected]>
1 parent 1f5889a commit 5b2e6f1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

xarray/backends/zarr.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -996,10 +996,7 @@ def set_variables(self, variables, check_encoding_set, writer, unlimited_dims=No
996996

997997
new_shape = list(zarr_array.shape)
998998
new_shape[append_axis] += v.shape[append_axis]
999-
if _zarr_v3():
1000-
zarr_array = zarr_array.resize(new_shape)
1001-
else:
1002-
zarr_array.resize(new_shape)
999+
zarr_array.resize(new_shape)
10031000

10041001
zarr_shape = zarr_array.shape
10051002

0 commit comments

Comments
 (0)