array-api-strict 2.3.1__tar.gz → 2.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/.github/workflows/array-api-tests.yml +13 -9
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/.github/workflows/docs-deploy.yml +1 -1
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/.github/workflows/tests.yml +9 -5
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/CHANGELOG.md +71 -0
- {array_api_strict-2.3.1/array_api_strict.egg-info → array_api_strict-2.4.1}/PKG-INFO +4 -3
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array-api-tests-xfails.txt +3 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/__init__.py +11 -5
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_array_object.py +258 -204
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_constants.py +1 -1
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_creation_functions.py +97 -119
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_data_type_functions.py +73 -64
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_dtypes.py +35 -24
- array_api_strict-2.4.1/array_api_strict/_elementwise_functions.py +356 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_fft.py +28 -32
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_flags.py +65 -26
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_helpers.py +22 -13
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_indexing_functions.py +3 -8
- array_api_strict-2.4.1/array_api_strict/_info.py +134 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_linalg.py +57 -53
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_linear_algebra_functions.py +11 -9
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_manipulation_functions.py +30 -30
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_searching_functions.py +22 -23
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_set_functions.py +4 -6
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_sorting_functions.py +6 -6
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_statistical_functions.py +57 -64
- array_api_strict-2.4.1/array_api_strict/_typing.py +69 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_utility_functions.py +11 -13
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/_version.py +2 -2
- array_api_strict-2.4.1/array_api_strict/py.typed +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/tests/test_array_object.py +215 -58
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/tests/test_creation_functions.py +14 -12
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/tests/test_data_type_functions.py +40 -6
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/tests/test_elementwise_functions.py +94 -45
- array_api_strict-2.4.1/array_api_strict/tests/test_searching_functions.py +102 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/tests/test_validation.py +1 -3
- {array_api_strict-2.3.1 → array_api_strict-2.4.1/array_api_strict.egg-info}/PKG-INFO +4 -3
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict.egg-info/SOURCES.txt +1 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/docs/changelog.md +71 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/pyproject.toml +17 -3
- array_api_strict-2.3.1/array_api_strict/_elementwise_functions.py +0 -700
- array_api_strict-2.3.1/array_api_strict/_info.py +0 -139
- array_api_strict-2.3.1/array_api_strict/_typing.py +0 -89
- array_api_strict-2.3.1/array_api_strict/tests/test_searching_functions.py +0 -44
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/.gitattributes +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/.github/dependabot.yml +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/.github/workflows/dependabot-auto-merge.yml +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/.github/workflows/docs-build.yml +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/.github/workflows/publish-package.yml +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/.github/workflows/ruff.yml +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/.gitignore +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/LICENSE +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/README.md +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/tests/__init__.py +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/tests/conftest.py +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/tests/test_device_support.py +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/tests/test_flags.py +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/tests/test_indexing_functions.py +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/tests/test_linalg.py +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/tests/test_manipulation_functions.py +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/tests/test_set_functions.py +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/tests/test_sorting_functions.py +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict/tests/test_statistical_functions.py +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict.egg-info/dependency_links.txt +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict.egg-info/requires.txt +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/array_api_strict.egg-info/top_level.txt +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/docs/Makefile +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/docs/_static/custom.css +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/docs/_static/favicon.png +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/docs/api.rst +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/docs/conf.py +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/docs/index.md +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/docs/make.bat +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/docs/releasing.md +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/docs/requirements.txt +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/pytest.ini +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/requirements-dev.txt +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/requirements.txt +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/ruff.toml +0 -0
- {array_api_strict-2.3.1 → array_api_strict-2.4.1}/setup.cfg +0 -0
|
@@ -3,20 +3,24 @@ name: Array API Tests
|
|
|
3
3
|
on: [push, pull_request]
|
|
4
4
|
|
|
5
5
|
env:
|
|
6
|
-
PYTEST_ARGS: "-v -rxXfE --
|
|
7
|
-
API_VERSIONS: "
|
|
6
|
+
PYTEST_ARGS: "-v -rxXfE --hypothesis-disable-deadline --max-examples 500 -n 4"
|
|
7
|
+
API_VERSIONS: "2023.12 2024.12"
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
10
|
array-api-tests:
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
strategy:
|
|
13
13
|
matrix:
|
|
14
|
-
python-version: ['3.
|
|
15
|
-
numpy-version: ['1.26', 'dev']
|
|
14
|
+
python-version: ['3.10', '3.11', '3.12', '3.13']
|
|
15
|
+
numpy-version: ['1.26', '2.3', 'dev']
|
|
16
16
|
exclude:
|
|
17
|
-
- python-version: '3.
|
|
18
|
-
numpy-version: '
|
|
19
|
-
|
|
17
|
+
- python-version: '3.10'
|
|
18
|
+
numpy-version: '2.3'
|
|
19
|
+
- python-version: '3.10'
|
|
20
|
+
numpy-version: 'dev'
|
|
21
|
+
- python-version: '3.13'
|
|
22
|
+
numpy-version: '1.26'
|
|
23
|
+
fail-fast: false
|
|
20
24
|
steps:
|
|
21
25
|
- name: Checkout array-api-strict
|
|
22
26
|
uses: actions/checkout@v4
|
|
@@ -38,11 +42,11 @@ jobs:
|
|
|
38
42
|
if [[ "${{ matrix.numpy-version }}" == "dev" ]]; then
|
|
39
43
|
python -m pip install --pre --extra-index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy;
|
|
40
44
|
else
|
|
41
|
-
python -m pip install 'numpy
|
|
45
|
+
python -m pip install 'numpy=='${{ matrix.numpy-version }};
|
|
42
46
|
fi
|
|
43
47
|
python -m pip install ${GITHUB_WORKSPACE}/array-api-strict
|
|
44
48
|
python -m pip install -r ${GITHUB_WORKSPACE}/array-api-tests/requirements.txt
|
|
45
|
-
python -m pip install hypothesis
|
|
49
|
+
python -m pip install hypothesis pytest-xdist
|
|
46
50
|
- name: Run the array API testsuite
|
|
47
51
|
env:
|
|
48
52
|
ARRAY_API_TESTS_MODULE: array_api_strict
|
|
@@ -5,12 +5,16 @@ jobs:
|
|
|
5
5
|
runs-on: ubuntu-latest
|
|
6
6
|
strategy:
|
|
7
7
|
matrix:
|
|
8
|
-
python-version: ['3.
|
|
9
|
-
numpy-version: ['1.26', 'dev']
|
|
8
|
+
python-version: ['3.10', '3.11', '3.12', '3.13']
|
|
9
|
+
numpy-version: ['1.26', '2.3', 'dev']
|
|
10
10
|
exclude:
|
|
11
|
-
- python-version: '3.
|
|
12
|
-
numpy-version: '
|
|
13
|
-
|
|
11
|
+
- python-version: '3.10'
|
|
12
|
+
numpy-version: '2.3'
|
|
13
|
+
- python-version: '3.10'
|
|
14
|
+
numpy-version: 'dev'
|
|
15
|
+
- python-version: '3.13'
|
|
16
|
+
numpy-version: '1.26'
|
|
17
|
+
fail-fast: false
|
|
14
18
|
steps:
|
|
15
19
|
- uses: actions/checkout@v4
|
|
16
20
|
- uses: actions/setup-python@v5
|
|
@@ -1,5 +1,76 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.4.1 (2025-07-27)
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- The array object defines `__array__` again when `__buffer__` is not available.
|
|
8
|
+
|
|
9
|
+
- Support for Python versions 3.10 and 3.11 has been reinstated.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- Arithmetic operations no longer accept NumPy arrays.
|
|
15
|
+
|
|
16
|
+
- Disallow `__setitem__` for invalid dtype combinations (e.g. setting a float value
|
|
17
|
+
into an integer array)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Contributors
|
|
21
|
+
|
|
22
|
+
The following users contributed to this release:
|
|
23
|
+
|
|
24
|
+
Evgeni Burovski,
|
|
25
|
+
Lucas Colley,
|
|
26
|
+
Guido Imperiale
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## 2.4.0 (2025-06-16)
|
|
30
|
+
|
|
31
|
+
### Major Changes
|
|
32
|
+
|
|
33
|
+
- The array object no longer defines `__array__`, and conversion to NumPy relies on the
|
|
34
|
+
buffer protocol, `__buffer__` instead. This change should be completely transparent to
|
|
35
|
+
users. Please report any issues this change causes however.
|
|
36
|
+
|
|
37
|
+
- Support for Python versions 3.9-3.11 was dropped. The minimum supported Python
|
|
38
|
+
versions is now 3.12.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Minor Changes
|
|
42
|
+
|
|
43
|
+
- `asarray` no longer accepts nested sequences of arrays. This is consistent with the
|
|
44
|
+
standard, which only allows _a (possibly nested) sequence of Python scalars_. In most
|
|
45
|
+
cases, this requires changing `asarray(list_of_arrays)` to `stack(list_of_arrays)`.
|
|
46
|
+
Note that this effectively disallows code such as
|
|
47
|
+
`asarray([x[i] for i in range(x.shape[0]])` since indexing 1D arrays produces 0D
|
|
48
|
+
arrays, not python scalars.
|
|
49
|
+
|
|
50
|
+
- Fix fancy indexing in a mult-device setting. The indexed arrays and all indexer arrays
|
|
51
|
+
must be the same device. Otherwise, an error is raised.
|
|
52
|
+
|
|
53
|
+
- Make `finfo` and `iinfo` accept arrays or dtypes, as required by the standard.
|
|
54
|
+
|
|
55
|
+
- Make `roll` only accept integers and tuples for the `shift` argument.
|
|
56
|
+
|
|
57
|
+
- Make `reshape` only accept tuples for the `shape` argument.
|
|
58
|
+
|
|
59
|
+
- Make testing of array iteration compatible with Python 3.14.
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Contributors
|
|
63
|
+
|
|
64
|
+
The following users contributed to this release:
|
|
65
|
+
|
|
66
|
+
Lumir Balhar,
|
|
67
|
+
Evgeni Burovski,
|
|
68
|
+
Joren Hammudoglu,
|
|
69
|
+
Tim Head,
|
|
70
|
+
Guido Imperiale,
|
|
71
|
+
Lucy Liu
|
|
72
|
+
|
|
73
|
+
|
|
3
74
|
## 2.3.1 (2025-03-20)
|
|
4
75
|
|
|
5
76
|
This is a bugfix release with no new features compared to 2.3. This release fixes an
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: array_api_strict
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.4.1
|
|
4
4
|
Summary: A strict, minimal implementation of the Python array API standard.
|
|
5
5
|
Author: Consortium for Python Data API Standards
|
|
6
6
|
License: Copyright (c) 2021-2024, NumPy Developers, Consortium for Python Data API Standards
|
|
@@ -35,15 +35,16 @@ License: Copyright (c) 2021-2024, NumPy Developers, Consortium for Python Data A
|
|
|
35
35
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
36
36
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
37
37
|
|
|
38
|
+
Project-URL: Homepage, https://data-apis.org/array-api-strict/
|
|
39
|
+
Project-URL: Repository, https://github.com/data-apis/array-api-strict
|
|
38
40
|
Classifier: Programming Language :: Python :: 3
|
|
39
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
40
41
|
Classifier: Programming Language :: Python :: 3.10
|
|
41
42
|
Classifier: Programming Language :: Python :: 3.11
|
|
42
43
|
Classifier: Programming Language :: Python :: 3.12
|
|
43
44
|
Classifier: Programming Language :: Python :: 3.13
|
|
44
45
|
Classifier: License :: OSI Approved :: BSD License
|
|
45
46
|
Classifier: Operating System :: OS Independent
|
|
46
|
-
Requires-Python: >=3.
|
|
47
|
+
Requires-Python: >=3.10
|
|
47
48
|
Description-Content-Type: text/markdown
|
|
48
49
|
License-File: LICENSE
|
|
49
50
|
Requires-Dist: numpy
|
|
@@ -26,3 +26,6 @@ array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(isfinite(x1_i) and
|
|
|
26
26
|
# The test suite is incorrectly checking sums that have loss of significance
|
|
27
27
|
# (https://github.com/data-apis/array-api-tests/issues/168)
|
|
28
28
|
array_api_tests/test_statistical_functions.py::test_sum
|
|
29
|
+
|
|
30
|
+
array_api_tests/test_special_cases.py::test_nan_propagation[cumulative_prod]
|
|
31
|
+
|
|
@@ -16,6 +16,8 @@ consuming libraries to test their array API usage.
|
|
|
16
16
|
|
|
17
17
|
"""
|
|
18
18
|
|
|
19
|
+
from types import ModuleType
|
|
20
|
+
|
|
19
21
|
__all__ = []
|
|
20
22
|
|
|
21
23
|
# Warning: __array_api_version__ could change globally with
|
|
@@ -325,12 +327,16 @@ from ._flags import (
|
|
|
325
327
|
ArrayAPIStrictFlags,
|
|
326
328
|
)
|
|
327
329
|
|
|
328
|
-
__all__ += [
|
|
330
|
+
__all__ += [
|
|
331
|
+
'set_array_api_strict_flags',
|
|
332
|
+
'get_array_api_strict_flags',
|
|
333
|
+
'reset_array_api_strict_flags',
|
|
334
|
+
'ArrayAPIStrictFlags',
|
|
335
|
+
'__version__',
|
|
336
|
+
]
|
|
329
337
|
|
|
330
338
|
try:
|
|
331
|
-
from . import
|
|
332
|
-
__version__ = _version.__version__
|
|
333
|
-
del _version
|
|
339
|
+
from ._version import __version__ # type: ignore[import-not-found,unused-ignore]
|
|
334
340
|
except ImportError:
|
|
335
341
|
__version__ = "unknown"
|
|
336
342
|
|
|
@@ -340,7 +346,7 @@ except ImportError:
|
|
|
340
346
|
# use __getattr__. Note that linalg and fft are dynamically added and removed
|
|
341
347
|
# from __all__ in set_array_api_strict_flags.
|
|
342
348
|
|
|
343
|
-
def __getattr__(name):
|
|
349
|
+
def __getattr__(name: str) -> ModuleType:
|
|
344
350
|
if name in ['linalg', 'fft']:
|
|
345
351
|
if name in get_array_api_strict_flags()['enabled_extensions']:
|
|
346
352
|
if name == 'linalg':
|