From 4318e5b8c4fd42a016bbf20b9bb0869c3083ce1b Mon Sep 17 00:00:00 2001 From: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> Date: Mon, 10 Aug 2026 17:38:09 +0530 Subject: [PATCH 01/12] Skip platform dependent array API failures Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> --- array-api-tests-xfails.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/array-api-tests-xfails.txt b/array-api-tests-xfails.txt index 6ad4df6..559bf5f 100644 --- a/array-api-tests-xfails.txt +++ b/array-api-tests-xfails.txt @@ -51,3 +51,12 @@ array_api_tests/test_dlpack.py::test_dunder_dlpack # NumPy 1.26: TypeError: numpy.from_dlpack() takes no keyword arguments array_api_tests/test_dlpack.py::test_from_dlpack + +# Platform specific issues tracked in NumPy here: https://github.com/numpy/numpy/issues/32234 +array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] +array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is 1 and imag(x_i) is +0) -> +infinity + 0j] +array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +infinity and imag(x_i) is NaN) -> +0 + NaN j] +array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is NaN and imag(x_i) is +infinity) -> \xb10 + \u03c0j/2] +array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is +infinity) -> +0 + NaN j] +array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] +array_api_tests/test_operators_and_elementwise_functions.py::test_sqrt From cf9cd808f953b3e2d3069efba3a8de9db212636f Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Mon, 10 Aug 2026 19:44:56 +0200 Subject: [PATCH 02/12] Apply suggestions from code review Co-authored-by: Evgeni Burovski --- array-api-tests-xfails.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/array-api-tests-xfails.txt b/array-api-tests-xfails.txt index 559bf5f..10a9340 100644 --- a/array-api-tests-xfails.txt +++ b/array-api-tests-xfails.txt @@ -52,11 +52,13 @@ array_api_tests/test_dlpack.py::test_dunder_dlpack # NumPy 1.26: TypeError: numpy.from_dlpack() takes no keyword arguments array_api_tests/test_dlpack.py::test_from_dlpack -# Platform specific issues tracked in NumPy here: https://github.com/numpy/numpy/issues/32234 +# https://github.com/numpy/numpy/issues/32234 : macOS specific failures array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is 1 and imag(x_i) is +0) -> +infinity + 0j] array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +infinity and imag(x_i) is NaN) -> +0 + NaN j] array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is NaN and imag(x_i) is +infinity) -> \xb10 + \u03c0j/2] array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is +infinity) -> +0 + NaN j] array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] + +# https://github.com/numpy/numpy/issues/32234 : macOS specific failure array_api_tests/test_operators_and_elementwise_functions.py::test_sqrt From fe6145d8794e515b95557d9cfe16b545d7e47c9e Mon Sep 17 00:00:00 2001 From: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> Date: Tue, 11 Aug 2026 02:43:26 +0530 Subject: [PATCH 03/12] Adding windows and macos CI environments Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> --- .github/workflows/array-api-tests.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/array-api-tests.yml b/.github/workflows/array-api-tests.yml index 7241d4b..070d72f 100644 --- a/.github/workflows/array-api-tests.yml +++ b/.github/workflows/array-api-tests.yml @@ -8,16 +8,20 @@ env: jobs: array-api-tests: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash strategy: matrix: + os: [ubuntu-latest, macos-latest, windows-latest] python-version: ['3.10', '3.13', '3.14'] numpy-version: ['1.26', 'latest', 'dev'] exclude: - python-version: '3.10' numpy-version: 'latest' - python-version: '3.10' - numpy-version: 'dev' + numpy-version: 'dev' - python-version: '3.13' numpy-version: '1.26' - python-version: '3.14' From a49463a9944f9eb17a45279e26cecf7d98597b0e Mon Sep 17 00:00:00 2001 From: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> Date: Sun, 16 Aug 2026 21:45:05 +0530 Subject: [PATCH 04/12] see which tests are failing where Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> --- array-api-tests-xfails.txt | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/array-api-tests-xfails.txt b/array-api-tests-xfails.txt index 10a9340..6ad4df6 100644 --- a/array-api-tests-xfails.txt +++ b/array-api-tests-xfails.txt @@ -51,14 +51,3 @@ array_api_tests/test_dlpack.py::test_dunder_dlpack # NumPy 1.26: TypeError: numpy.from_dlpack() takes no keyword arguments array_api_tests/test_dlpack.py::test_from_dlpack - -# https://github.com/numpy/numpy/issues/32234 : macOS specific failures -array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] -array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is 1 and imag(x_i) is +0) -> +infinity + 0j] -array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +infinity and imag(x_i) is NaN) -> +0 + NaN j] -array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is NaN and imag(x_i) is +infinity) -> \xb10 + \u03c0j/2] -array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is +infinity) -> +0 + NaN j] -array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] - -# https://github.com/numpy/numpy/issues/32234 : macOS specific failure -array_api_tests/test_operators_and_elementwise_functions.py::test_sqrt From 03463d185bc5193b4cee4daccb5722cb63da319d Mon Sep 17 00:00:00 2001 From: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> Date: Sun, 16 Aug 2026 22:03:43 +0530 Subject: [PATCH 05/12] add platform specific xfail files Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> --- .github/workflows/array-api-tests.yml | 12 +++++++++++- array-api-tests-macos-xfails.txt | 9 +++++++++ array-api-tests-windows-xfails.txt | 6 ++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 array-api-tests-macos-xfails.txt create mode 100644 array-api-tests-windows-xfails.txt diff --git a/.github/workflows/array-api-tests.yml b/.github/workflows/array-api-tests.yml index 070d72f..6e3d6ec 100644 --- a/.github/workflows/array-api-tests.yml +++ b/.github/workflows/array-api-tests.yml @@ -59,9 +59,19 @@ jobs: env: ARRAY_API_TESTS_MODULE: array_api_strict run: | + SKIPS_FILES="--skips-file ${GITHUB_WORKSPACE}/array-api-strict/array-api-tests-xfails.txt" + case "${{ matrix.os }}" in + macos-latest) + SKIPS_FILES="${SKIPS_FILES} --skips-file ${GITHUB_WORKSPACE}/array-api-strict/array-api-tests-macos-xfails.txt" + ;; + windows-latest) + SKIPS_FILES="${SKIPS_FILES} --skips-file ${GITHUB_WORKSPACE}/array-api-strict/array-api-tests-windows-xfails.txt" + ;; + esac + # Parameterizing this in the CI matrix is wasteful. Just do a loop here. for ARRAY_API_STRICT_API_VERSION in ${API_VERSIONS}; do export ARRAY_API_STRICT_API_VERSION cd ${GITHUB_WORKSPACE}/array-api-tests - pytest array_api_tests/ --skips-file ${GITHUB_WORKSPACE}/array-api-strict/array-api-tests-xfails.txt ${PYTEST_ARGS} + pytest array_api_tests/ ${SKIPS_FILES} ${PYTEST_ARGS} done diff --git a/array-api-tests-macos-xfails.txt b/array-api-tests-macos-xfails.txt new file mode 100644 index 0000000..88c5b51 --- /dev/null +++ b/array-api-tests-macos-xfails.txt @@ -0,0 +1,9 @@ +# https://github.com/numpy/numpy/issues/32234 +array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] +array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is +infinity) -> +0 + NaN j] +array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] +array_api_tests/test_operators_and_elementwise_functions.py::test_sqrt +array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is 1 and imag(x_i) is +0) -> +infinity + 0j] +array_api_tests/test_special_cases.py::test_unary[atanh(isfinite(real(x_i)) and real(x_i) != 0 and imag(x_i) is NaN) -> NaN + NaN j] +array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +infinity and imag(x_i) is NaN) -> +0 + NaN j] +array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is NaN and imag(x_i) is +infinity) -> ±0 + πj/2] \ No newline at end of file diff --git a/array-api-tests-windows-xfails.txt b/array-api-tests-windows-xfails.txt new file mode 100644 index 0000000..9616ece --- /dev/null +++ b/array-api-tests-windows-xfails.txt @@ -0,0 +1,6 @@ +# https://github.com/numpy/numpy/issues/32234 +array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] +array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is +infinity) -> +0 + NaN j] +array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] +array_api_tests/test_creation_functions.py::test_arange +array_api_tests/test_creation_functions.py::test_full \ No newline at end of file From 9feab6adb55f2b855022b171301f0a3816373ff1 Mon Sep 17 00:00:00 2001 From: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> Date: Sun, 16 Aug 2026 22:12:04 +0530 Subject: [PATCH 06/12] avoid unicode Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> --- array-api-tests-macos-xfails.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/array-api-tests-macos-xfails.txt b/array-api-tests-macos-xfails.txt index 88c5b51..a5ae591 100644 --- a/array-api-tests-macos-xfails.txt +++ b/array-api-tests-macos-xfails.txt @@ -6,4 +6,4 @@ array_api_tests/test_operators_and_elementwise_functions.py::test_sqrt array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is 1 and imag(x_i) is +0) -> +infinity + 0j] array_api_tests/test_special_cases.py::test_unary[atanh(isfinite(real(x_i)) and real(x_i) != 0 and imag(x_i) is NaN) -> NaN + NaN j] array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +infinity and imag(x_i) is NaN) -> +0 + NaN j] -array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is NaN and imag(x_i) is +infinity) -> ±0 + πj/2] \ No newline at end of file +array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is NaN and imag(x_i) is +infinity) -> \xb10 + \u03c0j/2] \ No newline at end of file From 1646c6d1cc971fb31a2f17d2a4b6a81ca9639c59 Mon Sep 17 00:00:00 2001 From: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> Date: Sun, 16 Aug 2026 22:19:55 +0530 Subject: [PATCH 07/12] CI specific failures on macos Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> --- array-api-tests-macos-xfails.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/array-api-tests-macos-xfails.txt b/array-api-tests-macos-xfails.txt index a5ae591..1b2069b 100644 --- a/array-api-tests-macos-xfails.txt +++ b/array-api-tests-macos-xfails.txt @@ -6,4 +6,5 @@ array_api_tests/test_operators_and_elementwise_functions.py::test_sqrt array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is 1 and imag(x_i) is +0) -> +infinity + 0j] array_api_tests/test_special_cases.py::test_unary[atanh(isfinite(real(x_i)) and real(x_i) != 0 and imag(x_i) is NaN) -> NaN + NaN j] array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +infinity and imag(x_i) is NaN) -> +0 + NaN j] -array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is NaN and imag(x_i) is +infinity) -> \xb10 + \u03c0j/2] \ No newline at end of file +array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is NaN and imag(x_i) is +infinity) -> \xb10 + \u03c0j/2] +array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is NaN and isfinite(imag(x_i))) -> NaN + NaN j] \ No newline at end of file From 895361acd56059da13aae8b8a535b6b0294edc2f Mon Sep 17 00:00:00 2001 From: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> Date: Sun, 16 Aug 2026 23:09:01 +0530 Subject: [PATCH 08/12] Inspect windows failures Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> --- array-api-tests-windows-xfails.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/array-api-tests-windows-xfails.txt b/array-api-tests-windows-xfails.txt index 9616ece..15753d5 100644 --- a/array-api-tests-windows-xfails.txt +++ b/array-api-tests-windows-xfails.txt @@ -2,5 +2,5 @@ array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is +infinity) -> +0 + NaN j] array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] -array_api_tests/test_creation_functions.py::test_arange -array_api_tests/test_creation_functions.py::test_full \ No newline at end of file +# array_api_tests/test_creation_functions.py::test_arange +# array_api_tests/test_creation_functions.py::test_full \ No newline at end of file From dbf0e322db1db64f41ce3b115334818b60d4cb09 Mon Sep 17 00:00:00 2001 From: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> Date: Sun, 16 Aug 2026 23:51:16 +0530 Subject: [PATCH 09/12] address numpy 2.0 fixes Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> --- array-api-tests-windows-xfails.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/array-api-tests-windows-xfails.txt b/array-api-tests-windows-xfails.txt index 15753d5..d4fc4e8 100644 --- a/array-api-tests-windows-xfails.txt +++ b/array-api-tests-windows-xfails.txt @@ -2,5 +2,7 @@ array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is +infinity) -> +0 + NaN j] array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] -# array_api_tests/test_creation_functions.py::test_arange -# array_api_tests/test_creation_functions.py::test_full \ No newline at end of file + +# https://github.com/numpy/numpy/pull/24224: Fixed in NumPy 2.0 +array_api_tests/test_creation_functions.py::test_arange +array_api_tests/test_creation_functions.py::test_full \ No newline at end of file From 3ce8fc87b3f8a27ab6a60acca9934e380429798f Mon Sep 17 00:00:00 2001 From: Pradyot Ranjan <99216956+prady0t@users.noreply.github.com> Date: Mon, 17 Aug 2026 00:05:27 +0530 Subject: [PATCH 10/12] Update array-api-tests-macos-xfails.txt Co-authored-by: Evgeni Burovski --- array-api-tests-macos-xfails.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/array-api-tests-macos-xfails.txt b/array-api-tests-macos-xfails.txt index 1b2069b..b95977c 100644 --- a/array-api-tests-macos-xfails.txt +++ b/array-api-tests-macos-xfails.txt @@ -1,3 +1,5 @@ +# Additional failures on MacOS: all tests listed in `array-api-tests-xfails.txt` fail everywhere, plus those listed here. +# # https://github.com/numpy/numpy/issues/32234 array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is +infinity) -> +0 + NaN j] From 51b70d0b4b2b53075cdc38c3cef266168ffdef2a Mon Sep 17 00:00:00 2001 From: Pradyot Ranjan <99216956+prady0t@users.noreply.github.com> Date: Mon, 17 Aug 2026 00:05:46 +0530 Subject: [PATCH 11/12] Update array-api-tests-windows-xfails.txt Co-authored-by: Evgeni Burovski --- array-api-tests-windows-xfails.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/array-api-tests-windows-xfails.txt b/array-api-tests-windows-xfails.txt index d4fc4e8..16f5054 100644 --- a/array-api-tests-windows-xfails.txt +++ b/array-api-tests-windows-xfails.txt @@ -1,3 +1,5 @@ +# Additional failures on Windows: all tests listed in `array-api-tests-xfails.txt` fail everywhere, plus those listed here. +# # https://github.com/numpy/numpy/issues/32234 array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is +infinity) -> +0 + NaN j] From 8106b0aa8fac132288fc17d1f651edeefef93c82 Mon Sep 17 00:00:00 2001 From: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> Date: Mon, 17 Aug 2026 00:25:14 +0530 Subject: [PATCH 12/12] removed additional # lines Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com> --- array-api-tests-macos-xfails.txt | 2 +- array-api-tests-windows-xfails.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/array-api-tests-macos-xfails.txt b/array-api-tests-macos-xfails.txt index b95977c..2ad2411 100644 --- a/array-api-tests-macos-xfails.txt +++ b/array-api-tests-macos-xfails.txt @@ -1,5 +1,5 @@ # Additional failures on MacOS: all tests listed in `array-api-tests-xfails.txt` fail everywhere, plus those listed here. -# + # https://github.com/numpy/numpy/issues/32234 array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is +infinity) -> +0 + NaN j] diff --git a/array-api-tests-windows-xfails.txt b/array-api-tests-windows-xfails.txt index 16f5054..899a6ca 100644 --- a/array-api-tests-windows-xfails.txt +++ b/array-api-tests-windows-xfails.txt @@ -1,5 +1,5 @@ # Additional failures on Windows: all tests listed in `array-api-tests-xfails.txt` fail everywhere, plus those listed here. -# + # https://github.com/numpy/numpy/issues/32234 array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j] array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is +infinity) -> +0 + NaN j]