Skip to content

Commit d2c238a

Browse files
committed
ENH: test torch.test_along_axis with indices < 0
1 parent 0c5d449 commit d2c238a

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
@@ -77,7 +77,6 @@ def test_take(x, data):
7777
)
7878
def test_take_along_axis(x, data):
7979
# TODO
80-
# 2. negative indices
8180
# 3. different dtypes for indices
8281
# 4. "broadcast-compatible" indices
8382
axis = data.draw(
@@ -97,7 +96,7 @@ def test_take_along_axis(x, data):
9796
hh.arrays(
9897
shape=idx_shape,
9998
dtype=dh.default_int,
100-
elements={"min_value": 0, "max_value": x.shape[n_axis]-1}
99+
elements={"min_value": -x.shape[n_axis], "max_value": x.shape[n_axis]-1}
101100
),
102101
label="indices"
103102
)

0 commit comments

Comments
 (0)