From c9622f965be76e947f2a7d3ecac827a90e67edfb Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Thu, 20 Mar 2025 13:11:49 +0100 Subject: [PATCH 1/4] DOC: add a changelog for 1.11.2 release --- docs/changelog.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index bdf5f9e1..18928e98 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,22 @@ # Changelog +## 1.11.2 (2025-03-20) + +This is a bugfix release with no new features compared to version 1.11. + +- fix the `result_type` wrapper for pytorch. Previously, `result_type` had multiple + issues with scalar arguments. +- fix several issues with `clip` wrappers. Previously, `clip` was failing to allow + behaviors which are unspecified by the 2024.12 standard but allowed by the array + libraries. + +The following users contributed to this release: + +Evgeni Burovski +Guido Imperiale +Magnus Dalen Kvalevåg + + ## 1.11.1 (2025-03-04) This is a bugfix release with no new features compared to version 1.11. From b8323760865a66ad03114ad80c1aa058df28dc98 Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Thu, 20 Mar 2025 13:17:22 +0100 Subject: [PATCH 2/4] BLD: upper cap setuptools, do not error on deprecationwarnings --- .github/workflows/publish-package.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 7733059d..6d88066d 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -41,13 +41,14 @@ jobs: - name: Install python-build and twine run: | - python -m pip install --upgrade pip setuptools + python -m pip install --upgrade pip "setuptools<=67" python -m pip install build twine python -m pip list - name: Build a wheel and a sdist run: | - PYTHONWARNINGS=error,default::DeprecationWarning python -m build . + #PYTHONWARNINGS=error,default::DeprecationWarning python -m build . + python -m build . - name: Verify the distribution run: twine check --strict dist/* From 1b0de51538deb7c21d0c268f36764a8589e40012 Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Thu, 20 Mar 2025 13:33:39 +0100 Subject: [PATCH 3/4] REL: bump the version to 1.11.2 --- array_api_compat/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/array_api_compat/__init__.py b/array_api_compat/__init__.py index 60b37e97..96b061e7 100644 --- a/array_api_compat/__init__.py +++ b/array_api_compat/__init__.py @@ -17,6 +17,6 @@ this implementation for the default when working with NumPy arrays. """ -__version__ = '1.12.dev0' +__version__ = '1.11.2' from .common import * # noqa: F401, F403 From b1316cff516d147519a9c30f0e8327e5895598f4 Mon Sep 17 00:00:00 2001 From: Evgeni Burovski Date: Thu, 20 Mar 2025 16:47:38 +0100 Subject: [PATCH 4/4] 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 --- numpy-1-21-xfails.txt | 3 +++ numpy-1-26-xfails.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/numpy-1-21-xfails.txt b/numpy-1-21-xfails.txt index 28c0e13a..7c7a0757 100644 --- a/numpy-1-21-xfails.txt +++ b/numpy-1-21-xfails.txt @@ -212,3 +212,6 @@ array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -infinity array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -infinity and isfinite(x2_i) and x2_i < 0) -> +infinity] array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i > 0 and x2_i is -infinity) -> -0] array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> -0] + +# numpy < 2 bug: type promotion of asarray([], 'float32') and (np.finfo(float32).max + 1) -> float64 +array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real diff --git a/numpy-1-26-xfails.txt b/numpy-1-26-xfails.txt index 80790534..57259b6f 100644 --- a/numpy-1-26-xfails.txt +++ b/numpy-1-26-xfails.txt @@ -66,3 +66,6 @@ array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -infinity array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -infinity and isfinite(x2_i) and x2_i < 0) -> +infinity] array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i > 0 and x2_i is -infinity) -> -0] array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> -0] + +# numpy < 2 bug: type promotion of asarray([], 'float32') and (finfo(float32).max + 1) gives float64 not float32 +array_api_tests/test_operators_and_elementwise_functions.py::test_binary_with_scalars_real