Skip to content

Commit 0827b10

Browse files
committed
Now passes all setitem tests
1 parent b4a2add commit 0827b10

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/blosc2/ndarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1796,7 +1796,7 @@ def updater(sel_idx):
17961796
for c in product(*intersecting_chunks):
17971797
sel_idx, glob_selection, sub_idx = _get_selection(c, _slice, chunks)
17981798
sel_idx = tuple(s for s, m in zip(sel_idx, mask, strict=True) if not m)
1799-
sub_idx = tuple(s if not m else k.start for s, m, k in zip(sub_idx, mask, key_, strict=True))
1799+
sub_idx = tuple(s if not m else s.start for s, m in zip(sub_idx, mask, strict=True))
18001800
locstart, locstop = _get_local_slice(
18011801
glob_selection,
18021802
(),

tests/array-api-xfails.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
array_api_tests/test_array_object.py::test_setitem
21
array_api_tests/test_array_object.py::test_getitem_masking

tests/ndarray/test_setitem.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818
([12, 13, 14, 15, 16], [5, 5, 5, 5, 5], [2, 2, 2, 2, 2], (slice(1, 3), ..., slice(3, 6)), np.float32),
1919
([12, 13, 14, 15, 16], [5, 5, 5, 5, 5], [2, 2, 2, 2, 2], (slice(1, 9, 2), ..., slice(3, 6)), np.float32),
2020
([12, 13], [5, 5], [2, 2], (slice(11, 2, -1), slice(6, 2, -1)), np.float32),
21-
([25, 13, 22], [5, 5, 3], [2, 2, 1], (slice(17, 2, -3), 0, slice(6, 2, -1)), np.float32),
21+
([25, 13, 22], [5, 5, 3], [2, 2, 1], (slice(17, 2, -3), 2, slice(6, 2, -1)), np.float32),
2222
([25, 13, 22], [5, 5, 3], [2, 2, 1], (np.s_[-5:-15:-1], np.s_[-3:-11:-2], slice(6, 2, -1)), np.float32),
2323
([0, 13, 22], [0, 5, 3], [0, 2, 1], (np.s_[:], np.s_[-5:-15:-1], slice(6, 2, -1)), np.float32),
24+
([13, 22], [5, 3], [2, 1], (1, np.s_[-5::-1]), np.float32),
2425
]
2526

2627

0 commit comments

Comments
 (0)