Skip to content

Commit 2784516

Browse files
committed
ENH: test take with negative indices
1 parent 9cd8883 commit 2784516

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

array_api_tests/test_indexing_functions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
)
1818
def test_take(x, data):
1919
# TODO:
20-
# * negative indices
2120
# * different dtypes for indices
2221

2322
# axis is optional but only if x.ndim == 1
@@ -28,7 +27,7 @@ def test_take(x, data):
2827
kw = {"axis": data.draw(_axis_st)}
2928
axis = kw.get("axis", 0)
3029
_indices = data.draw(
31-
st.lists(st.integers(0, x.shape[axis] - 1), min_size=1, unique=True),
30+
st.lists(st.integers(-x.shape[axis], x.shape[axis] - 1), min_size=1, unique=True),
3231
label="_indices",
3332
)
3433
n_axis = axis if axis>=0 else x.ndim + axis

0 commit comments

Comments
 (0)