Skip to content

Commit de56acf

Browse files
authored
Declare support for Array API 2024.12 (#797)
* Declare support for Array API 2024.12 * Add more skips to array API tests for 2024.12 * Exclude take_along_axis test
1 parent 083c63e commit de56acf

File tree

6 files changed

+28
-4
lines changed

6 files changed

+28
-4
lines changed

.github/workflows/array-api-tests.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,24 @@ jobs:
8989
array_api_tests/test_special_cases.py::test_empty_arrays[var]
9090
array_api_tests/test_special_cases.py::test_nan_propagation[std]
9191
array_api_tests/test_special_cases.py::test_nan_propagation[var]
92+
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is +infinity and isfinite(x2_i) and x2_i > 0) -> +infinity]
93+
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is +infinity and isfinite(x2_i) and x2_i < 0) -> -infinity]
94+
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is -infinity and isfinite(x2_i) and x2_i > 0) -> -infinity]
95+
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is -infinity and isfinite(x2_i) and x2_i < 0) -> +infinity]
96+
array_api_tests/test_special_cases.py::test_binary[floor_divide(isfinite(x1_i) and x1_i > 0 and x2_i is -infinity) -> -0]
97+
array_api_tests/test_special_cases.py::test_binary[floor_divide(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> -0]
98+
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i is +infinity and isfinite(x2_i) and x2_i > 0) -> +infinity]
99+
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i is +infinity and isfinite(x2_i) and x2_i < 0) -> -infinity]
100+
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i is -infinity and isfinite(x2_i) and x2_i > 0) -> -infinity]
101+
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i is -infinity and isfinite(x2_i) and x2_i < 0) -> +infinity]
102+
array_api_tests/test_special_cases.py::test_binary[__floordiv__(isfinite(x1_i) and x1_i > 0 and x2_i is -infinity) -> -0]
103+
array_api_tests/test_special_cases.py::test_binary[__floordiv__(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> -0]
104+
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is +infinity and isfinite(x2_i) and x2_i > 0) -> +infinity]
105+
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is +infinity and isfinite(x2_i) and x2_i < 0) -> -infinity]
106+
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -infinity and isfinite(x2_i) and x2_i > 0) -> -infinity]
107+
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -infinity and isfinite(x2_i) and x2_i < 0) -> +infinity]
108+
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i > 0 and x2_i is -infinity) -> -0]
109+
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> -0]
92110
93111
# don't test names yet as some are not implemented
94112
array_api_tests/test_has_names.py
@@ -102,6 +120,7 @@ jobs:
102120
array_api_tests/test_signatures.py::test_func_signature[from_dlpack]
103121
array_api_tests/test_signatures.py::test_func_signature[argsort]
104122
array_api_tests/test_signatures.py::test_func_signature[sort]
123+
array_api_tests/test_signatures.py::test_func_signature[take_along_axis]
105124
array_api_tests/test_signatures.py::test_array_method_signature[__dlpack__]
106125
array_api_tests/test_signatures.py::test_array_method_signature[__dlpack_device__]
107126
array_api_tests/test_signatures.py::test_array_method_signature[__setitem__]
@@ -112,6 +131,9 @@ jobs:
112131
array_api_tests/test_linalg.py::test_vecdot
113132
# (getitem with negative step size is not implemented)
114133
array_api_tests/test_array_object.py::test_getitem
134+
# (indexing with more than one integer index is not implemented)
135+
array_api_tests/test_array_object.py::test_getitem_arrays_and_ints_1
136+
array_api_tests/test_array_object.py::test_getitem_arrays_and_ints_2
115137
# test_searchsorted depends on sort which is not implemented
116138
array_api_tests/test_searching_functions.py::test_searchsorted
117139
# cumulative_* functions with include_initial=True are not implemented
@@ -122,6 +144,7 @@ jobs:
122144
array_api_tests/test_array_object.py::test_setitem
123145
array_api_tests/test_array_object.py::test_setitem_masking
124146
array_api_tests/test_creation_functions.py::test_asarray_arrays
147+
array_api_tests/test_indexing_functions.py::test_take_along_axis
125148
array_api_tests/test_manipulation_functions.py::test_repeat
126149
array_api_tests/test_sorting_functions.py
127150

api_status.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Array API Coverage Implementation Status
22

3-
Cubed supports version [2023.12](https://data-apis.org/array-api/2023.12/index.html) of the Python array API standard, with a few exceptions noted below. The [Fourier transform functions](https://data-apis.org/array-api/2023.12/extensions/fourier_transform_functions.html) are *not* supported.
3+
Cubed supports version [2024.12](https://data-apis.org/array-api/2024.12/index.html) of the Python array API standard, with a few exceptions noted below. The [Fourier transform functions](https://data-apis.org/array-api/2024.12/extensions/fourier_transform_functions.html) are *not* supported.
44

55
This table shows which parts of the the [Array API](https://data-apis.org/array-api/latest/API_specification/index.html) have been implemented in Cubed, and which ones are missing. The version column shows the version when the feature was added to the standard, for version 2022.12 or later.
66

cubed/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
# Array API
5151

52-
__array_api_version__ = "2023.12"
52+
__array_api_version__ = "2024.12"
5353

5454
from .array_api.inspection import __array_namespace_info__
5555

cubed/array_api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__all__ = []
22

3-
__array_api_version__ = "2023.12"
3+
__array_api_version__ = "2024.12"
44

55
from .inspection import __array_namespace_info__
66

cubed/array_api/array_object.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ def __array_namespace__(self, /, *, api_version=None):
365365
"2021.12",
366366
"2022.12",
367367
"2023.12",
368+
"2024.12",
368369
):
369370
raise ValueError(f"Unrecognized array API version: {api_version!r}")
370371
import cubed

docs/array-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Python Array API
22

3-
Cubed implements version 2023.12 of the [Python Array API standard](https://data-apis.org/array-api/2023.12/index.html) in `cubed.array_api`, with a few exceptions listed on the [coverage status](https://github.com/cubed-dev/cubed/blob/main/api_status.md) page. The [Fourier transform functions](https://data-apis.org/array-api/2023.12/extensions/fourier_transform_functions.html) are *not* supported.
3+
Cubed implements version 2024.12 of the [Python Array API standard](https://data-apis.org/array-api/2024.12/index.html) in `cubed.array_api`, with a few exceptions listed on the [coverage status](https://github.com/cubed-dev/cubed/blob/main/api_status.md) page. The [Fourier transform functions](https://data-apis.org/array-api/2024.12/extensions/fourier_transform_functions.html) are *not* supported.
44

55
## Differences between Cubed and the standard
66

0 commit comments

Comments
 (0)