Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.9 release #185

Merged
merged 5 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion array_api_compat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions cupy-xfails.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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__]
36 changes: 36 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -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.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asmeurer it seems that the fact that numpy 2 now again unconditionally wrapped is not mentioned in the changelog for 1.9:

#170

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I've fixed this in #188

## 1.8 (2024-07-24)

### Major Changes
Expand Down
2 changes: 2 additions & 0 deletions numpy-1-21-xfails.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions numpy-1-26-xfails.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions numpy-dev-xfails.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions numpy-xfails.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions test_cupy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
Loading