From ddbbc35ab2bebed4637f18e227d6a9138c0f7669 Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Fri, 9 May 2025 16:19:59 +0200 Subject: [PATCH 1/3] TST: add a skip for CuPy pow(er) is not fully NEP50 compatible in CuPy 13.x --- cupy-xfails.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cupy-xfails.txt b/cupy-xfails.txt index a30572f8..55c6437d 100644 --- a/cupy-xfails.txt +++ b/cupy-xfails.txt @@ -37,6 +37,8 @@ array_api_tests/test_operators_and_elementwise_functions.py::test_subtract[__sub array_api_tests/test_operators_and_elementwise_functions.py::test_add[__add__(x, s)] # floating point inaccuracy array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[remainder(x1, x2)] +# incomplete NEP50 support in CuPy 13.x (fixed in 14.0.0a1) +array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real[pow] # cupy (arg)min/max wrong with infinities # https://github.com/cupy/cupy/issues/7424 From 7d7a85862b345e0247e20dd64dbe6d327098a869 Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Fri, 9 May 2025 14:46:06 +0000 Subject: [PATCH 2/3] TST: update CuPy skips --- cupy-xfails.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cupy-xfails.txt b/cupy-xfails.txt index 55c6437d..89e9af54 100644 --- a/cupy-xfails.txt +++ b/cupy-xfails.txt @@ -39,6 +39,9 @@ array_api_tests/test_operators_and_elementwise_functions.py::test_add[__add__(x, array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[remainder(x1, x2)] # incomplete NEP50 support in CuPy 13.x (fixed in 14.0.0a1) array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real[pow] +array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real[logaddexp] +array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real[nextafter] +array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real[hypot] # cupy (arg)min/max wrong with infinities # https://github.com/cupy/cupy/issues/7424 @@ -187,7 +190,6 @@ array_api_tests/test_signatures.py::test_func_signature[from_dlpack] array_api_tests/test_signatures.py::test_array_method_signature[__dlpack__] # 2024.12 support -array_api_tests/test_signatures.py::test_func_signature[count_nonzero] array_api_tests/test_signatures.py::test_func_signature[bitwise_and] array_api_tests/test_signatures.py::test_func_signature[bitwise_left_shift] array_api_tests/test_signatures.py::test_func_signature[bitwise_or] From 4e3d809646653a919d9c494b8afd730291e441fb Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Fri, 9 May 2025 17:10:49 +0200 Subject: [PATCH 3/3] TST: add xfails for NumPy 1.22 and 1.26 / python scalars --- numpy-1-22-xfails.txt | 7 +++++++ numpy-1-26-xfails.txt | 2 ++ 2 files changed, 9 insertions(+) diff --git a/numpy-1-22-xfails.txt b/numpy-1-22-xfails.txt index 93edf311..c1de77d8 100644 --- a/numpy-1-22-xfails.txt +++ b/numpy-1-22-xfails.txt @@ -123,6 +123,13 @@ array_api_tests/test_operators_and_elementwise_functions.py::test_subtract[subtr array_api_tests/test_searching_functions.py::test_where array_api_tests/test_special_cases.py::test_iop[__iadd__(x1_i is -0 and x2_i is -0) -> -0] +array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real[add] +array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real[divide] +array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real[hypot] +array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real[subtract] + +array_api_tests/test_operators_and_elementwise_functions.py::test_where_with_scalars + # 2023.12 support array_api_tests/test_has_names.py::test_has_names[creation-from_dlpack] array_api_tests/test_signatures.py::test_func_signature[from_dlpack] diff --git a/numpy-1-26-xfails.txt b/numpy-1-26-xfails.txt index 51e1a658..98cb9f6c 100644 --- a/numpy-1-26-xfails.txt +++ b/numpy-1-26-xfails.txt @@ -50,6 +50,8 @@ array_api_tests/test_signatures.py::test_func_signature[bitwise_right_shift] array_api_tests/test_signatures.py::test_func_signature[bitwise_xor] array_api_tests/test_data_type_functions.py::TestResultType::test_with_scalars +array_api_tests/test_operators_and_elementwise_functions.py::test_where_with_scalars + # Stubs have a comment: (**note**: libraries may return ``NaN`` to match Python behavior.); Apparently, NumPy does just that array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is +infinity and isfinite(x2_i) and x2_i > 0) -> +infinity] array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is +infinity and isfinite(x2_i) and x2_i < 0) -> -infinity]