@@ -129,17 +129,11 @@ def test_void_scalar_empty_tuple(self):
129
129
assert_equal (s [()], s )
130
130
assert_equal (type (s [...]), np .ndarray )
131
131
132
- @pytest .mark .xfail (
133
- reason = (
134
- "torch does not support integer indexing int tensors with uints - "
135
- "torch instead treats uint8 tensors as boolean masks (deprecated)"
136
- )
137
- )
138
132
def test_same_kind_index_casting (self ):
139
133
# Indexes should be cast with same-kind and not safe, even if that
140
134
# is somewhat unsafe. So test various different code paths.
141
135
index = np .arange (5 )
142
- u_index = index .astype (np .uintp ) # i.e. cast to default uint indexing dtype
136
+ u_index = index .astype (np .uint8 ) # i.e. cast to default uint indexing dtype
143
137
arr = np .arange (10 )
144
138
145
139
assert_array_equal (arr [index ], arr [u_index ])
@@ -150,6 +144,7 @@ def test_same_kind_index_casting(self):
150
144
assert_array_equal (arr [index ], arr [u_index ])
151
145
152
146
arr [u_index ] = np .arange (5 )[:,None ]
147
+ pytest .xfail ("XXX: repeat() not implemented" )
153
148
assert_array_equal (arr , np .arange (5 )[:,None ].repeat (2 , axis = 1 ))
154
149
155
150
arr = np .arange (25 ).reshape (5 , 5 )
@@ -488,12 +483,6 @@ def __array__(self):
488
483
assert_ (isinstance (a [z , np .array (0 )], np .ndarray ))
489
484
assert_ (isinstance (a [z , ArrayLike ()], np .ndarray ))
490
485
491
- @pytest .mark .xfail (
492
- reason = (
493
- "torch does not support integer indexing int tensors with uints - "
494
- "torch instead treats uint8 tensors as boolean masks (deprecated)"
495
- )
496
- )
497
486
def test_small_regressions (self ):
498
487
# Reference count of intp for index checks
499
488
a = np .array ([0 ])
0 commit comments