@@ -393,7 +393,7 @@ def test_trivial_fancy_not_possible(self):
393
393
res [3 ] = - 1
394
394
assert_array_equal (a , res )
395
395
396
- @pytest .mark .xfail (reason = "XXX: wrapping view stuff is TBD " )
396
+ @pytest .mark .skip (reason = "torch does not support subclassing " )
397
397
def test_nonbaseclass_values (self ):
398
398
class SubClass (np .ndarray ):
399
399
def __array_finalize__ (self , old ):
@@ -415,7 +415,7 @@ def __array_finalize__(self, old):
415
415
a [...] = s
416
416
assert_ ((a == 1 ).all ())
417
417
418
- @pytest .mark .xfail (reason = "XXX: wrapping view stuff is TBD " )
418
+ @pytest .mark .skip (reason = "torch does not support subclassing " )
419
419
def test_array_like_values (self ):
420
420
# Similar to the above test, but use a memoryview instead
421
421
a = np .zeros ((5 , 5 ))
@@ -510,7 +510,7 @@ def test_small_regressions(self):
510
510
if HAS_REFCOUNT :
511
511
assert_equal (sys .getrefcount (np .dtype (np .intp )), refcount )
512
512
513
- @pytest .mark .xfail (reason = "XXX: wrapping view stuff is TBD " )
513
+ @pytest .mark .skip (reason = "torch does not support subclassing " )
514
514
def test_unaligned (self ):
515
515
v = (np .zeros (64 , dtype = np .int8 ) + ord ('a' ))[1 :- 7 ]
516
516
d = v .view (np .dtype ("S8" ))
@@ -624,7 +624,7 @@ def test_too_many_advanced_indices(self, index, num, original_ndim):
624
624
arr [(index ,) * num ] = 1.
625
625
626
626
627
- @pytest .mark .xfail (reason = "XXX: wrapping view stuff is TBD " )
627
+ @pytest .mark .skip (reason = "torch does not support subclassing " )
628
628
@pytest .mark .skipif (IS_WASM , reason = "no threading" )
629
629
def test_structured_advanced_indexing (self ):
630
630
# Test that copyswap(n) used by integer array indexing is threadsafe
@@ -743,7 +743,7 @@ def test_broadcast_subspace(self):
743
743
assert_ ((a [::- 1 ] == v ).all ())
744
744
745
745
746
- @pytest .mark .xfail (reason = "XXX: wrapping view stuff is TBD " )
746
+ @pytest .mark .skip (reason = "torch does not support subclassing " )
747
747
class TestSubclasses :
748
748
def test_basic (self ):
749
749
# Test that indexing in various ways produces SubClass instances,
@@ -1225,7 +1225,7 @@ def _check_single_index(self, arr, index):
1225
1225
def _compare_index_result (self , arr , index , mimic_get , no_copy ):
1226
1226
"""Compare mimicked result to indexing result.
1227
1227
"""
1228
- pytest .xfail ( "XXX: wrapping view stuff is TBD " )
1228
+ pytest .skip ( "torch does not support subclassing " )
1229
1229
arr = arr .copy ()
1230
1230
indexed_arr = arr [index ]
1231
1231
assert_array_equal (indexed_arr , mimic_get )
0 commit comments