File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change
1
+ import sys
1
2
import operator
2
3
from builtins import all as all_
3
4
@@ -351,6 +352,10 @@ def test_array_properties():
351
352
assert b .mT .shape == (3 , 2 )
352
353
353
354
355
+ @pytest .mark .xfail (sys .version_info .major * 100 + sys .version_info .minor < 312 ,
356
+ reason = "array conversion relies on buffer protocol, and "
357
+ "requires python >= 3.12"
358
+ )
354
359
def test_array_conversion ():
355
360
# Check that arrays on the CPU device can be converted to NumPy
356
361
# but arrays on other devices can't. Note this is testing the logic in
Original file line number Diff line number Diff line change
1
+ import sys
1
2
import warnings
2
3
3
4
from numpy .testing import assert_raises
@@ -97,7 +98,12 @@ def test_asarray_copy():
97
98
a [0 ] = 0
98
99
assert all (b [0 ] == 0 )
99
100
100
- def test_asarray_list_of_lists ():
101
+
102
+ @pytest .mark .xfail (sys .version_info .major * 100 + sys .version_info .minor < 312 ,
103
+ reason = "array conversion relies on buffer protocol, and "
104
+ "requires python >= 3.12"
105
+ )
106
+ def test_asarray_list_of_arrays ():
101
107
a = asarray (1 , dtype = int16 )
102
108
b = asarray ([1 ], dtype = int16 )
103
109
res = asarray ([a , a ])
You can’t perform that action at this time.
0 commit comments