@@ -191,7 +191,6 @@ def test_get_basic_selection_0d(store: StorePath):
191
191
slice (50 , 150 , 10 ),
192
192
]
193
193
194
-
195
194
basic_selections_1d_bad = [
196
195
# only positive step supported
197
196
slice (None , None , - 1 ),
@@ -292,7 +291,6 @@ def test_get_basic_selection_1d(store: StorePath):
292
291
(Ellipsis , slice (None ), slice (None )),
293
292
]
294
293
295
-
296
294
basic_selections_2d_bad = [
297
295
# bad stuff
298
296
2.3 ,
@@ -1749,8 +1747,9 @@ def test_accessed_chunks(shape, chunks, ops):
1749
1747
def test_indexing_equals_numpy (store , selection ):
1750
1748
a = np .arange (10000 , dtype = int ).reshape (1000 , 10 )
1751
1749
z = zarr_array_from_numpy_array (store , a , chunk_shape = (300 , 3 ))
1752
- expected = a [* selection ]
1753
- actual = z [* selection ]
1750
+ # note: in python 3.10 a[*selection] is no valid unpacking syntax
1751
+ expected = a [(* selection ,)]
1752
+ actual = z [(* selection ,)]
1754
1753
assert_array_equal (expected , actual , err_msg = f"selection: { selection } " )
1755
1754
1756
1755
@@ -1767,5 +1766,6 @@ def test_orthogonal_bool_indexing_like_numpy_ix(store, selection):
1767
1766
a = np .arange (10000 , dtype = int ).reshape (1000 , 10 )
1768
1767
z = zarr_array_from_numpy_array (store , a , chunk_shape = (300 , 3 ))
1769
1768
expected = a [np .ix_ (* selection )]
1770
- actual = z [* selection ]
1769
+ # note: in python 3.10 z[*selection] is no valid unpacking syntax
1770
+ actual = z [(* selection ,)]
1771
1771
assert_array_equal (expected , actual , err_msg = f"{ selection = } " )
0 commit comments