Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions array_api_tests/test_indexing_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
)
def test_take(x, data):
# TODO:
# * negative indices
# * different dtypes for indices

# axis is optional but only if x.ndim == 1
Expand All @@ -28,7 +27,7 @@ def test_take(x, data):
kw = {"axis": data.draw(_axis_st)}
axis = kw.get("axis", 0)
_indices = data.draw(
st.lists(st.integers(0, x.shape[axis] - 1), min_size=1, unique=True),
st.lists(st.integers(-x.shape[axis], x.shape[axis] - 1), min_size=1, unique=True),
label="_indices",
)
n_axis = axis if axis>=0 else x.ndim + axis
Expand Down Expand Up @@ -77,7 +76,6 @@ def test_take(x, data):
)
def test_take_along_axis(x, data):
# TODO
# 2. negative indices
# 3. different dtypes for indices
# 4. "broadcast-compatible" indices
axis = data.draw(
Expand All @@ -97,7 +95,7 @@ def test_take_along_axis(x, data):
hh.arrays(
shape=idx_shape,
dtype=dh.default_int,
elements={"min_value": 0, "max_value": x.shape[n_axis]-1}
elements={"min_value": -x.shape[n_axis], "max_value": x.shape[n_axis]-1}
),
label="indices"
)
Expand Down