diff --git a/array_api_compat/__init__.py b/array_api_compat/__init__.py index 01f33b20..5815fb27 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.8' +__version__ = '1.9' from .common import * # noqa: F401, F403 diff --git a/cupy-xfails.txt b/cupy-xfails.txt index 9c865fad..fb7b03da 100644 --- a/cupy-xfails.txt +++ b/cupy-xfails.txt @@ -161,6 +161,7 @@ array_api_tests/test_special_cases.py::test_unary[floor(x_i is -0) -> -0] array_api_tests/test_special_cases.py::test_unary[log1p(x_i is -0) -> -0] array_api_tests/test_special_cases.py::test_unary[round(x_i is -0) -> -0] array_api_tests/test_special_cases.py::test_unary[sin(x_i is -0) -> -0] +array_api_tests/test_special_cases.py::test_unary[signbit(x_i is -0) -> True] array_api_tests/test_special_cases.py::test_unary[sinh(x_i is -0) -> -0] array_api_tests/test_special_cases.py::test_unary[sqrt(x_i is -0) -> -0] array_api_tests/test_special_cases.py::test_unary[tan(x_i is -0) -> -0] @@ -172,3 +173,10 @@ array_api_tests/test_special_cases.py::test_unary[trunc(x_i is -0) -> -0] array_api_tests/test_fft.py::test_fftn array_api_tests/test_fft.py::test_ifftn array_api_tests/test_fft.py::test_rfftn + +# 2023.12 support +# cupy.ndaray cannot be specified as `repeats` argument. +array_api_tests/test_manipulation_functions.py::test_repeat +array_api_tests/test_signatures.py::test_func_signature[from_dlpack] +array_api_tests/test_signatures.py::test_func_signature[astype] +array_api_tests/test_signatures.py::test_array_method_signature[__dlpack__] diff --git a/docs/changelog.md b/docs/changelog.md index d3d02da0..d1e67333 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,41 @@ # Changelog +## 1.9 (2024-10-??) + +### Major Changes + +- New helper functions to determine if a namespace is from a given library + ({func}`~.is_numpy_namespace`, {func}`~.is_torch_namespace`, etc.). + +- More support for the [2023.12 version of the + standard](https://data-apis.org/array-api/latest/changelog.html#v2023-12). + This includes + - Wrappers for `cumulative_sum()`. + - Wrappers for `unstack()`. + - Update floating-point type promotion in `sum()`, `prod()`, and `trace()` + to be inline with the 2023.12 specification (32-bit types no longer + promote to 64-bit when `dtype=None`). + - Add the [inspection + APIs](https://data-apis.org/array-api/latest/API_specification/inspection.html) + to the wrapped namespaces. These can be accessed with + `xp.__array_namespace_info__()`. + - Various fixes to the `clip()` wrappers. + +- `torch.conj` now wrapps `torch.conj_physical`, which makes a copy rather + than setting the conjugation bit, as arrays with the conjugation bit set do + not support some APIs. + +- `torch.sign` is now wrapped to support complex numbers and propogate nans + properly. + +### Minor Changes + +- Support for JAX 0.4.32 and newer which implements the array API directly in + `jax.numpy`. + +- `hypot`, `minimum`, and `maximum` (new in 2023.12) are wrapped in PyTorch to + support proper scalar type promotion. + ## 1.8 (2024-07-24) ### Major Changes diff --git a/numpy-1-21-xfails.txt b/numpy-1-21-xfails.txt index d6a2c251..459b33e3 100644 --- a/numpy-1-21-xfails.txt +++ b/numpy-1-21-xfails.txt @@ -256,3 +256,5 @@ array_api_tests/test_searching_functions.py::test_searchsorted array_api_tests/test_signatures.py::test_func_signature[from_dlpack] array_api_tests/test_signatures.py::test_func_signature[astype] array_api_tests/test_signatures.py::test_array_method_signature[__dlpack__] +# uint64 repeats not supported +array_api_tests/test_manipulation_functions.py::test_repeat diff --git a/numpy-1-26-xfails.txt b/numpy-1-26-xfails.txt index 30b5d302..57b80e7e 100644 --- a/numpy-1-26-xfails.txt +++ b/numpy-1-26-xfails.txt @@ -51,3 +51,5 @@ array_api_tests/test_searching_functions.py::test_searchsorted array_api_tests/test_signatures.py::test_func_signature[from_dlpack] array_api_tests/test_signatures.py::test_func_signature[astype] array_api_tests/test_signatures.py::test_array_method_signature[__dlpack__] +# uint64 repeats not supported +array_api_tests/test_manipulation_functions.py::test_repeat diff --git a/numpy-dev-xfails.txt b/numpy-dev-xfails.txt index 68f954d2..23a83e1e 100644 --- a/numpy-dev-xfails.txt +++ b/numpy-dev-xfails.txt @@ -23,3 +23,5 @@ array_api_tests/test_signatures.py::test_extension_func_signature[linalg.vecdot] array_api_tests/test_signatures.py::test_func_signature[astype] array_api_tests/test_signatures.py::test_func_signature[from_dlpack] array_api_tests/test_signatures.py::test_array_method_signature[__dlpack__] +# uint64 repeats not supported +array_api_tests/test_manipulation_functions.py::test_repeat diff --git a/numpy-xfails.txt b/numpy-xfails.txt index cdcd2576..1c9d98f6 100644 --- a/numpy-xfails.txt +++ b/numpy-xfails.txt @@ -43,3 +43,5 @@ array_api_tests/test_searching_functions.py::test_searchsorted array_api_tests/test_signatures.py::test_func_signature[from_dlpack] array_api_tests/test_signatures.py::test_func_signature[astype] array_api_tests/test_signatures.py::test_array_method_signature[__dlpack__] +# uint64 repeats not supported +array_api_tests/test_manipulation_functions.py::test_repeat diff --git a/test_cupy.sh b/test_cupy.sh index 1655597e..2e176aa1 100755 --- a/test_cupy.sh +++ b/test_cupy.sh @@ -26,4 +26,5 @@ mkdir -p $SCRIPT_DIR/.hypothesis ln -s $SCRIPT_DIR/.hypothesis .hypothesis export ARRAY_API_TESTS_MODULE=array_api_compat.cupy +export ARRAY_API_TESTS_VERSION=2023.12 pytest array_api_tests/ ${PYTEST_ARGS} --xfails-file $SCRIPT_DIR/cupy-xfails.txt "$@"