Skip to content

Commit b1316cf

Browse files
committed
TST: skip tests of binary funcs w/scalar on older numpies
NumPy < 2 fails to promote an empty f32 array with a scalar, returns an empty f64 array
1 parent 1b0de51 commit b1316cf

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

numpy-1-21-xfails.txt

+3
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,6 @@ array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -infinity
212212
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -infinity and isfinite(x2_i) and x2_i < 0) -> +infinity]
213213
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i > 0 and x2_i is -infinity) -> -0]
214214
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> -0]
215+
216+
# numpy < 2 bug: type promotion of asarray([], 'float32') and (np.finfo(float32).max + 1) -> float64
217+
array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real

numpy-1-26-xfails.txt

+3
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,6 @@ array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -infinity
6666
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -infinity and isfinite(x2_i) and x2_i < 0) -> +infinity]
6767
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i > 0 and x2_i is -infinity) -> -0]
6868
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> -0]
69+
70+
# numpy < 2 bug: type promotion of asarray([], 'float32') and (finfo(float32).max + 1) gives float64 not float32
71+
array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real

0 commit comments

Comments
 (0)