Skip to content

Commit a4f41e4

Browse files
committed
Partially xfail test_nontuple_ndindex
1 parent 9b85d99 commit a4f41e4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

torch_np/tests/numpy_tests/core/test_indexing.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,12 @@ def test_nontuple_ndindex(self):
652652
a = np.arange(25).reshape((5, 5))
653653
assert_equal(a[[0, 1]], np.array([a[0], a[1]]))
654654
assert_equal(a[[0, 1], [0, 1]], np.array([0, 6]))
655+
pytest.xfail(
656+
"torch happily consumes non-tuple sequences with multi-axis "
657+
"indices (i.e. slices) as an index, whereas NumPy invalidates "
658+
"them, assumedly to keep things simple. This invalidation "
659+
"behaviour is just too niche to bother emulating."
660+
)
655661
assert_raises(IndexError, a.__getitem__, [slice(None)])
656662

657663

0 commit comments

Comments
 (0)