Skip to content

Commit d5d408f

Browse files
committed
updates _set_selection for arrays with 0 len dimensions. Ups fsspec version
1 parent 994f7b6 commit d5d408f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

zarr/core.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,8 @@ def _get_selection(self, indexer, out=None, fields=None):
10201020
check_array_shape('out', out, out_shape)
10211021

10221022
# iterate over chunks
1023-
if not hasattr(self.chunk_store, "getitems") or not all(map(lambda x: x != 0, self.shape)):
1023+
if not hasattr(self.chunk_store, "getitems") or \
1024+
not all(map(lambda x: x != 0, self.shape)):
10241025
# sequentially get one key at a time from storage
10251026
for chunk_coords, chunk_selection, out_selection in indexer:
10261027

@@ -1535,7 +1536,8 @@ def _set_selection(self, indexer, value, fields=None):
15351536
check_array_shape('value', value, sel_shape)
15361537

15371538
# iterate over chunks in range
1538-
if not hasattr(self.store, "setitems") or self._synchronizer is not None:
1539+
if not hasattr(self.store, "setitems") or self._synchronizer is not None \
1540+
or not all(map(lambda x: x != 0, self.shape)):
15391541
# iterative approach
15401542
for chunk_coords, chunk_selection, out_selection in indexer:
15411543

0 commit comments

Comments
 (0)