diff --git a/tiled/adapters/zarr.py b/tiled/adapters/zarr.py index f7c5e513a..70cd54758 100644 --- a/tiled/adapters/zarr.py +++ b/tiled/adapters/zarr.py @@ -200,15 +200,15 @@ async def append_block( ------- """ - old_shape = self._array.shape - new_shape = list(old_shape) - new_shape[axis] += list(self._array.shape)[axis] # Extend along axis + + new_shape = list(self._array.shape) + new_shape[axis] += list(data.shape)[axis] # Extend along axis # Resize the Zarr array to accommodate new data - data.resize(tuple(new_shape)) + self._array.resize(tuple(new_shape)) # Append the new data to the resized array - data[-data.shape[0]:] = data # Slicing to place data at the end + self._array[-data.shape[0]:] = data # Slicing to place data at the end if sys.version_info < (3, 9): from typing_extensions import Mapping