array-api-compat 1.14.0__tar.gz → 1.16.0__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.
Files changed (113) hide show
  1. array_api_compat-1.16.0/.git-blame-ignore-revs +2 -0
  2. array_api_compat-1.16.0/.gitattributes +2 -0
  3. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/.github/dependabot.yml +2 -0
  4. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/.github/workflows/array-api-tests.yml +6 -3
  5. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/.github/workflows/dependabot-auto-merge.yml +1 -1
  6. array_api_compat-1.16.0/.github/workflows/docs-build.yml +24 -0
  7. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/.github/workflows/docs-deploy.yml +3 -3
  8. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/.github/workflows/publish-package.yml +10 -10
  9. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/.github/workflows/ruff.yml +2 -2
  10. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/.github/workflows/tests.yml +21 -4
  11. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/.gitignore +2 -0
  12. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/CHANGELOG.md +68 -1
  13. {array_api_compat-1.14.0/array_api_compat.egg-info → array_api_compat-1.16.0}/PKG-INFO +6 -36
  14. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/README.md +2 -1
  15. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/cupy-xfails.txt +5 -0
  16. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/dask-xfails.txt +8 -0
  17. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/docs/changelog.md +68 -1
  18. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/docs/dev/releasing.md +4 -5
  19. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/docs/dev/tests.md +3 -2
  20. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/docs/helper-functions.rst +4 -0
  21. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/docs/index.md +7 -7
  22. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/docs/supported-array-libraries.md +15 -0
  23. array_api_compat-1.16.0/meson.build +76 -0
  24. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/numpy-1-22-xfails.txt +8 -0
  25. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/numpy-1-26-xfails.txt +6 -2
  26. array_api_compat-1.16.0/pixi.lock +2824 -0
  27. array_api_compat-1.16.0/pixi.toml +65 -0
  28. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/pyproject.toml +35 -21
  29. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/__init__.py +3 -3
  30. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/common/_fft.py +12 -12
  31. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/common/_helpers.py +166 -5
  32. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/cupy/__init__.py +2 -2
  33. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/cupy/linalg.py +1 -1
  34. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/dask/array/__init__.py +2 -2
  35. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/numpy/__init__.py +2 -3
  36. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/numpy/_aliases.py +112 -3
  37. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/torch/__init__.py +2 -2
  38. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/torch/_aliases.py +68 -25
  39. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/torch/_info.py +0 -3
  40. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/torch/fft.py +10 -10
  41. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/tests/_helpers.py +1 -1
  42. array_api_compat-1.16.0/tests/meson.build +17 -0
  43. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/tests/test_array_namespace.py +5 -1
  44. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/tests/test_common.py +13 -2
  45. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/tests/test_cupy.py +11 -0
  46. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/tests/test_isdtype.py +1 -1
  47. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/tests/test_no_dependencies.py +4 -4
  48. array_api_compat-1.16.0/tests/test_numpy.py +156 -0
  49. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/tests/test_torch.py +87 -1
  50. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/torch-xfails.txt +1 -25
  51. array_api_compat-1.16.0/vendor_tests/meson.build +11 -0
  52. {array_api_compat-1.14.0/tests → array_api_compat-1.16.0/vendor_tests}/test_vendoring.py +5 -4
  53. {array_api_compat-1.14.0/vendor_test → array_api_compat-1.16.0/vendor_tests}/uses_cupy.py +1 -1
  54. {array_api_compat-1.14.0/vendor_test → array_api_compat-1.16.0/vendor_tests}/uses_dask.py +2 -2
  55. {array_api_compat-1.14.0/vendor_test → array_api_compat-1.16.0/vendor_tests}/uses_numpy.py +1 -1
  56. {array_api_compat-1.14.0/vendor_test → array_api_compat-1.16.0/vendor_tests}/uses_torch.py +1 -1
  57. array_api_compat-1.14.0/.github/workflows/docs-build.yml +0 -22
  58. array_api_compat-1.14.0/PKG-INFO +0 -60
  59. array_api_compat-1.14.0/array_api_compat.egg-info/SOURCES.txt +0 -103
  60. array_api_compat-1.14.0/array_api_compat.egg-info/dependency_links.txt +0 -1
  61. array_api_compat-1.14.0/array_api_compat.egg-info/requires.txt +0 -39
  62. array_api_compat-1.14.0/array_api_compat.egg-info/top_level.txt +0 -1
  63. array_api_compat-1.14.0/setup.cfg +0 -4
  64. array_api_compat-1.14.0/vendor_test/vendored/__init__.py +0 -0
  65. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/.github/workflows/array-api-tests-dask.yml +0 -0
  66. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/.github/workflows/array-api-tests-numpy-1-22.yml +0 -0
  67. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/.github/workflows/array-api-tests-numpy-1-26.yml +0 -0
  68. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/.github/workflows/array-api-tests-numpy-dev.yml +0 -0
  69. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/.github/workflows/array-api-tests-numpy-latest.yml +0 -0
  70. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/.github/workflows/array-api-tests-torch.yml +0 -0
  71. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/CONTRIBUTING.md +0 -0
  72. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/LICENSE +0 -0
  73. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/dask-skips.txt +0 -0
  74. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/docs/Makefile +0 -0
  75. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/docs/_static/custom.css +0 -0
  76. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/docs/_static/favicon.png +0 -0
  77. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/docs/conf.py +0 -0
  78. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/docs/dev/implementation-notes.md +0 -0
  79. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/docs/dev/index.md +0 -0
  80. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/docs/dev/special-considerations.md +0 -0
  81. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/docs/make.bat +0 -0
  82. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/numpy-dev-xfails.txt +0 -0
  83. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/numpy-skips.txt +0 -0
  84. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/numpy-xfails.txt +0 -0
  85. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/_internal.py +0 -0
  86. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/common/__init__.py +0 -0
  87. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/common/_aliases.py +0 -0
  88. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/common/_linalg.py +0 -0
  89. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/common/_typing.py +0 -0
  90. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/cupy/_aliases.py +0 -0
  91. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/cupy/_info.py +0 -0
  92. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/cupy/_typing.py +0 -0
  93. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/cupy/fft.py +0 -0
  94. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/dask/__init__.py +0 -0
  95. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/dask/array/_aliases.py +0 -0
  96. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/dask/array/_info.py +0 -0
  97. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/dask/array/fft.py +0 -0
  98. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/dask/array/linalg.py +0 -0
  99. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/numpy/_info.py +0 -0
  100. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/numpy/_typing.py +0 -0
  101. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/numpy/fft.py +0 -0
  102. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/numpy/linalg.py +0 -0
  103. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/py.typed +0 -0
  104. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/torch/_typing.py +0 -0
  105. {array_api_compat-1.14.0 → array_api_compat-1.16.0/src}/array_api_compat/torch/linalg.py +0 -0
  106. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/test_cupy.sh +0 -0
  107. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/tests/__init__.py +0 -0
  108. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/tests/test_all.py +0 -0
  109. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/tests/test_copies_or_views.py +0 -0
  110. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/tests/test_dask.py +0 -0
  111. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/tests/test_jax.py +0 -0
  112. {array_api_compat-1.14.0 → array_api_compat-1.16.0}/torch-skips.txt +0 -0
  113. {array_api_compat-1.14.0/vendor_test → array_api_compat-1.16.0/vendor_tests}/__init__.py +0 -0
@@ -0,0 +1,2 @@
1
+ # refactor to `src` layout
2
+ 0d15d23693dd3f6b82e007793ef9b6c8d43e5eac
@@ -0,0 +1,2 @@
1
+ # SCM syntax highlighting & preventing 3-way merges
2
+ pixi.lock merge=binary linguist-language=YAML linguist-generated=true -diff
@@ -5,6 +5,8 @@ updates:
5
5
  directory: "/"
6
6
  schedule:
7
7
  interval: "weekly"
8
+ cooldown:
9
+ default-days: 7 # optional
8
10
  groups:
9
11
  actions:
10
12
  patterns:
@@ -49,19 +49,19 @@ jobs:
49
49
 
50
50
  steps:
51
51
  - name: Checkout array-api-compat
52
- uses: actions/checkout@v6
52
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
53
53
  with:
54
54
  path: array-api-compat
55
55
 
56
56
  - name: Checkout array-api-tests
57
- uses: actions/checkout@v6
57
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
58
58
  with:
59
59
  repository: data-apis/array-api-tests
60
60
  submodules: 'true'
61
61
  path: array-api-tests
62
62
 
63
63
  - name: Set up Python ${{ matrix.python-version }}
64
- uses: actions/setup-python@v6
64
+ uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
65
65
  with:
66
66
  python-version: ${{ matrix.python-version }}
67
67
 
@@ -78,6 +78,9 @@ jobs:
78
78
  python -m pip install -r ${GITHUB_WORKSPACE}/array-api-tests/requirements.txt
79
79
  python -m pip install pytest-xdist
80
80
 
81
+ - name: Install array-api-compat
82
+ run: python -m pip install ${GITHUB_WORKSPACE}/array-api-compat
83
+
81
84
  - name: Dump pip environment
82
85
  run: pip freeze
83
86
 
@@ -13,7 +13,7 @@ jobs:
13
13
  steps:
14
14
  - name: Dependabot metadata
15
15
  id: metadata
16
- uses: dependabot/fetch-metadata@v2
16
+ uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
17
17
  with:
18
18
  github-token: "${{ secrets.GITHUB_TOKEN }}"
19
19
  - name: Enable auto-merge for Dependabot PRs
@@ -0,0 +1,24 @@
1
+ name: Docs Build
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ docs-build:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
10
+ - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
11
+ - name: Install Dependencies
12
+ run: |
13
+ python -m pip install --upgrade pip
14
+ python -m pip install .
15
+ python -m pip install --group docs
16
+ - name: Build Docs
17
+ run: |
18
+ cd docs
19
+ make html
20
+ - name: Upload Artifact
21
+ uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
22
+ with:
23
+ name: docs-build
24
+ path: docs/_build/html
@@ -11,9 +11,9 @@ jobs:
11
11
  environment:
12
12
  name: docs-deploy
13
13
  steps:
14
- - uses: actions/checkout@v6
14
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
15
15
  - name: Download Artifact
16
- uses: dawidd6/action-download-artifact@v15
16
+ uses: dawidd6/action-download-artifact@eab87c9830c39eff17e5a6eadb20bfb4bc880477 # v27
17
17
  with:
18
18
  workflow: docs-build.yml
19
19
  name: docs-build
@@ -23,7 +23,7 @@ jobs:
23
23
  # See
24
24
  # https://github.com/JamesIves/github-pages-deploy-action/tree/dev#using-an-ssh-deploy-key-
25
25
  - name: Deploy
26
- uses: JamesIves/github-pages-deploy-action@v4
26
+ uses: JamesIves/github-pages-deploy-action@fa24774553152dd7873cd16ebd8d959b010c5445 # v4.9.0
27
27
  with:
28
28
  folder: docs/_build/html
29
29
  ssh-key: ${{ secrets.DEPLOY_KEY }}
@@ -4,8 +4,8 @@ on:
4
4
  branches:
5
5
  - main
6
6
  tags:
7
- - '[0-9]+.[0-9]+'
8
- - '[0-9]+.[0-9]+.[0-9]+'
7
+ - '*.*'
8
+ - '*.*.*'
9
9
  pull_request:
10
10
  branches:
11
11
  - main
@@ -30,18 +30,18 @@ jobs:
30
30
  runs-on: ubuntu-latest
31
31
 
32
32
  steps:
33
- - uses: actions/checkout@v6
33
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
34
34
  with:
35
35
  fetch-depth: 0
36
36
 
37
37
  - name: Set up Python
38
- uses: actions/setup-python@v6
38
+ uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 #v7.1.0
39
39
  with:
40
40
  python-version: '3.x'
41
41
 
42
42
  - name: Install python-build and twine
43
43
  run: |
44
- python -m pip install --upgrade pip "setuptools<=67"
44
+ python -m pip install --upgrade pip meson-python
45
45
  python -m pip install build twine
46
46
  python -m pip list
47
47
 
@@ -60,7 +60,7 @@ jobs:
60
60
  run: python -m zipfile --list dist/array_api_compat-*.whl
61
61
 
62
62
  - name: Upload distribution artifact
63
- uses: actions/upload-artifact@v6
63
+ uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
64
64
  with:
65
65
  name: dist-artifact
66
66
  path: dist
@@ -81,7 +81,7 @@ jobs:
81
81
 
82
82
  steps:
83
83
  - name: Download distribution artifact
84
- uses: actions/download-artifact@v7
84
+ uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
85
85
  with:
86
86
  name: dist-artifact
87
87
  path: dist
@@ -95,19 +95,19 @@ jobs:
95
95
  # if: >-
96
96
  # (github.event_name == 'push' && startsWith(github.ref, 'refs/tags'))
97
97
  # || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true')
98
- # uses: pypa/gh-action-pypi-publish@v1.13.0
98
+ # uses: pypa/gh-action-pypi-publish@v1.14.2
99
99
  # with:
100
100
  # repository-url: https://test.pypi.org/legacy/
101
101
  # print-hash: true
102
102
 
103
103
  - name: Publish distribution 📦 to PyPI
104
104
  if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
105
- uses: pypa/gh-action-pypi-publish@v1.13.0
105
+ uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
106
106
  with:
107
107
  print-hash: true
108
108
 
109
109
  - name: Create GitHub Release from a Tag
110
- uses: softprops/action-gh-release@v2
110
+ uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
111
111
  if: startsWith(github.ref, 'refs/tags/')
112
112
  with:
113
113
  files: dist/*
@@ -5,9 +5,9 @@ jobs:
5
5
  runs-on: ubuntu-latest
6
6
  continue-on-error: true
7
7
  steps:
8
- - uses: actions/checkout@v6
8
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
9
9
  - name: Install Python
10
- uses: actions/setup-python@v6
10
+ uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 #v7.1.0
11
11
  with:
12
12
  python-version: "3.11"
13
13
  - name: Install dependencies
@@ -27,8 +27,8 @@ jobs:
27
27
  python-version: '3.14'
28
28
 
29
29
  steps:
30
- - uses: actions/checkout@v6
31
- - uses: actions/setup-python@v6
30
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
31
+ - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 #v7.1.0
32
32
  with:
33
33
  python-version: ${{ matrix.python-version }}
34
34
  - name: Install Dependencies
@@ -43,7 +43,8 @@ jobs:
43
43
  if [ "${{ matrix.numpy-version }}" == "dev" ]; then
44
44
  python -m pip install numpy --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
45
45
  python -m pip install dask[array] jax[cpu]
46
- if ["${{ matrix.python-version }}" != "3.14]; then
46
+ python -m pip install --index-url https://software.repos.intel.com/python/pypi dpnp
47
+ if [ "${{ matrix.python-version }}" != "3.14" ]; then
47
48
  python -m pip install sparse ndonnx
48
49
  fi
49
50
  elif [ "${{ matrix.numpy-version }}" == "1.22" ]; then
@@ -53,11 +54,21 @@ jobs:
53
54
  else
54
55
  python -m pip install numpy
55
56
  python -m pip install dask[array] jax[cpu]
56
- if ["${{ matrix.python-version }}" != "3.14]; then
57
+ python -m pip install --index-url https://software.repos.intel.com/python/pypi dpnp
58
+ if [ "${{ matrix.python-version }}" != "3.14" ]; then
57
59
  python -m pip install sparse ndonnx
58
60
  fi
59
61
  fi
60
62
 
63
+ # mparray requires Python >=3.11 and NumPy >=2.
64
+ if [[ "${{ matrix.python-version }}" =~ ^3\.1[1-4]$ &&
65
+ "${{ matrix.numpy-version }}" =~ ^(latest|dev)$ ]]; then
66
+ python -m pip install mparray
67
+ fi
68
+
69
+ - name: Set environment variables
70
+ run: echo "OCL_ICD_FILENAMES=$LD_LIBRARY_PATH/libintelocl.so" >> "$GITHUB_ENV"
71
+
61
72
  - name: Dump pip environment
62
73
  run: pip freeze
63
74
 
@@ -66,3 +77,9 @@ jobs:
66
77
 
67
78
  - name: Run Tests
68
79
  run: pytest -v
80
+
81
+ - name: Run vendoring tests
82
+ run: |
83
+ rm -rf vendor_tests/array_api_compat
84
+ cp -r src/array_api_compat vendor_tests/
85
+ pytest -v vendor_tests
@@ -1,3 +1,5 @@
1
+ vendor_tests/array_api_compat
2
+
1
3
  # Byte-compiled / optimized / DLL files
2
4
  __pycache__/
3
5
  *.py[cod]
@@ -1,5 +1,72 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.16.0 (2026-10-25)
4
+
5
+ ### New features
6
+
7
+ - New helpers for the `mparray` library have been added: `is_mparray_array` and
8
+ `is_mparray_namespace`.
9
+ - New helpers for the `dpnp` library have been added: `is_dpnp_array` and
10
+ `is_dpnp_namespace`.
11
+ - `torch.reshape` now implements `copy=` arguments.
12
+ - Pytorch binary functions have been wrapped to accept (array, python scalar) pairs.
13
+
14
+ ### Perfomance and other improvements
15
+
16
+ - Performance of `numpy.clip` has been improved
17
+ - `numpy.reshape` uses the native numpy `reshape` function for `numpy >= 2.1`
18
+ - Multiple `fft` functions avoid an unneccessary copy, which improves performance
19
+ and memory consumption
20
+ - `py.typed` marker is included in the installed package.
21
+
22
+ ### The following users contributed to this release:
23
+
24
+ Raashish Aggarwal,
25
+ Evgeni Burovski,
26
+ Lucas Colley,
27
+ Stanley C,
28
+ Matt Haberland,
29
+ Tim Head,
30
+ Chris Ninham,
31
+ Laslo Ruhberg.
32
+
33
+
34
+ ## 1.15.0 (2026-06-07)
35
+
36
+ ### Major changes
37
+
38
+ - `array_namespace` can now be used under `torch.compile`.
39
+ - The build system has changed from `setuptools` to `meson-python`.
40
+ Projects vendoring array-api-compat inside a meson project can now
41
+ rely on the in-tree meson project definition, which exposes the Python
42
+ sources via the `sources` variable. For example:
43
+ ```meson
44
+ array_api_compat = subproject('array_api_compat')
45
+ array_api_compat_sources = array_api_compat.get_variable('sources')
46
+ foreach prefix, files : array_api_compat_sources
47
+ py3.install_sources(files, subdir: external_dir / prefix)
48
+ endforeach
49
+ ```
50
+
51
+ ### Minor changes
52
+
53
+ - `torch.round` now supports complex input.
54
+ - `torch.arange` now works around missing dtype implementations instead of raising
55
+ an exception.
56
+
57
+ Bug fixes:
58
+ - `np.matrix` instances are no longer considered to be standard array objects.
59
+ - `torch.meshgrid` now correctly handles the case of no input arrays.
60
+
61
+ ### Contributors
62
+
63
+ The following users contributed to this release:
64
+
65
+ Lucas Colley,
66
+ Evgeni Burovski,
67
+ Chris Ninham,
68
+ Dimitri Papadopoulos Orfanos.
69
+
3
70
  ## 1.14.0 (2026-02-26)
4
71
 
5
72
  ### Major changes
@@ -257,7 +324,7 @@ Thomas Li
257
324
  than setting the conjugation bit, as arrays with the conjugation bit set do
258
325
  not support some APIs.
259
326
 
260
- - `torch.sign` is now wrapped to support complex numbers and propogate nans
327
+ - `torch.sign` is now wrapped to support complex numbers and propagate nans
261
328
  properly.
262
329
 
263
330
  ### Minor Changes
@@ -1,59 +1,29 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: array-api-compat
3
- Version: 1.14.0
3
+ Version: 1.16.0
4
4
  Summary: A wrapper around NumPy and other array libraries to make them compatible with the Array API standard
5
5
  Author: Consortium for Python Data API Standards
6
6
  License-Expression: MIT
7
- Project-URL: homepage, https://data-apis.org/array-api-compat/
8
- Project-URL: repository, https://github.com/data-apis/array-api-compat/
9
7
  Classifier: Operating System :: OS Independent
10
8
  Classifier: Programming Language :: Python :: 3
11
9
  Classifier: Programming Language :: Python :: 3.10
12
10
  Classifier: Programming Language :: Python :: 3.11
13
11
  Classifier: Programming Language :: Python :: 3.12
14
12
  Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
15
14
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
15
  Classifier: Typing :: Typed
16
+ Project-URL: homepage, https://data-apis.org/array-api-compat/
17
+ Project-URL: repository, https://github.com/data-apis/array-api-compat/
17
18
  Requires-Python: >=3.10
18
19
  Description-Content-Type: text/markdown
19
- License-File: LICENSE
20
- Provides-Extra: cupy
21
- Requires-Dist: cupy; extra == "cupy"
22
- Provides-Extra: dask
23
- Requires-Dist: dask>=2024.9.0; extra == "dask"
24
- Provides-Extra: jax
25
- Requires-Dist: jax; extra == "jax"
26
- Provides-Extra: numpy
27
- Requires-Dist: numpy>=1.22; extra == "numpy"
28
- Provides-Extra: pytorch
29
- Requires-Dist: torch; extra == "pytorch"
30
- Provides-Extra: sparse
31
- Requires-Dist: sparse>=0.15.1; extra == "sparse"
32
- Provides-Extra: ndonnx
33
- Requires-Dist: ndonnx; extra == "ndonnx"
34
- Provides-Extra: docs
35
- Requires-Dist: furo; extra == "docs"
36
- Requires-Dist: linkify-it-py; extra == "docs"
37
- Requires-Dist: myst-parser; extra == "docs"
38
- Requires-Dist: sphinx; extra == "docs"
39
- Requires-Dist: sphinx-copybutton; extra == "docs"
40
- Requires-Dist: sphinx-autobuild; extra == "docs"
41
- Provides-Extra: dev
42
- Requires-Dist: array-api-strict; extra == "dev"
43
- Requires-Dist: dask[array]>=2024.9.0; extra == "dev"
44
- Requires-Dist: jax[cpu]; extra == "dev"
45
- Requires-Dist: ndonnx; extra == "dev"
46
- Requires-Dist: numpy>=1.22; extra == "dev"
47
- Requires-Dist: pytest; extra == "dev"
48
- Requires-Dist: torch; extra == "dev"
49
- Requires-Dist: sparse>=0.15.1; extra == "dev"
50
- Dynamic: license-file
51
20
 
52
21
  # Array API compatibility library
53
22
 
54
23
  This is a small wrapper around common array libraries that is compatible with
55
24
  the [Array API standard](https://data-apis.org/array-api/latest/). Currently,
56
- NumPy, CuPy, PyTorch, Dask, JAX, ndonnx and `sparse` are supported. If you want
25
+ NumPy, CuPy, PyTorch, Dask, JAX, mparray, ndonnx, `sparse` and dpnp are
26
+ supported. If you want
57
27
  support for other array libraries, or if you encounter any issues, please [open
58
28
  an issue](https://github.com/data-apis/array-api-compat/issues).
59
29
 
@@ -2,7 +2,8 @@
2
2
 
3
3
  This is a small wrapper around common array libraries that is compatible with
4
4
  the [Array API standard](https://data-apis.org/array-api/latest/). Currently,
5
- NumPy, CuPy, PyTorch, Dask, JAX, ndonnx and `sparse` are supported. If you want
5
+ NumPy, CuPy, PyTorch, Dask, JAX, mparray, ndonnx, `sparse` and dpnp are
6
+ supported. If you want
6
7
  support for other array libraries, or if you encounter any issues, please [open
7
8
  an issue](https://github.com/data-apis/array-api-compat/issues).
8
9
 
@@ -217,3 +217,8 @@ array_api_tests/test_special_cases.py::test_binary[nextafter(x1_i is +0 and x2_i
217
217
 
218
218
  # cupy 13.x follows numpy 1.x w/o weak promotion: result_type(int32, uint8, 1) != result_type(int32, uint8)
219
219
  array_api_tests/test_data_type_functions.py::TestResultType::test_with_scalars
220
+
221
+ # CuPy 14 does not support copy= dlpack argument
222
+ array_api_tests/test_dlpack.py::test_dunder_dlpack
223
+ array_api_tests/test_dlpack.py::test_from_dlpack
224
+
@@ -173,3 +173,11 @@ array_api_tests/test_special_cases.py::test_unary[sqrt(real(x_i) is +infinity an
173
173
  array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +infinity and isfinite(imag(x_i)) and imag(x_i) > 0) -> 1 + 0j]
174
174
  array_api_tests/test_special_cases.py::test_unary[expm1((real(x_i) is +0 or real(x_i) == -0) and imag(x_i) is +0) -> 0 + 0j]
175
175
  array_api_tests/test_special_cases.py::test_unary[acosh(real(x_i) is +0 and imag(x_i) is NaN) -> NaN \xb1 \u03c0j/2]
176
+
177
+ # no dlpack support
178
+ array_api_tests/test_dlpack.py::test_dlpack_device
179
+ array_api_tests/test_dlpack.py::test_dunder_dlpack
180
+ array_api_tests/test_dlpack.py::test_from_dlpack
181
+
182
+ # reshape copy=False code path assigns to the .shape attribute
183
+ array_api_tests/test_manipulation_functions.py::test_reshape
@@ -1,5 +1,72 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.16.0 (2026-10-25)
4
+
5
+ ### New features
6
+
7
+ - New helpers for the `mparray` library have been added: `is_mparray_array` and
8
+ `is_mparray_namespace`.
9
+ - New helpers for the `dpnp` library have been added: `is_dpnp_array` and
10
+ `is_dpnp_namespace`.
11
+ - `torch.reshape` now implements `copy=` arguments.
12
+ - Pytorch binary functions have been wrapped to accept (array, python scalar) pairs.
13
+
14
+ ### Perfomance and other improvements
15
+
16
+ - Performance of `numpy.clip` has been improved
17
+ - `numpy.reshape` uses the native numpy `reshape` function for `numpy >= 2.1`
18
+ - Multiple `fft` functions avoid an unneccessary copy, which improves performance
19
+ and memory consumption
20
+ - `py.typed` marker is included in the installed package.
21
+
22
+ ### The following users contributed to this release:
23
+
24
+ Raashish Aggarwal,
25
+ Evgeni Burovski,
26
+ Lucas Colley,
27
+ Stanley C,
28
+ Matt Haberland,
29
+ Tim Head,
30
+ Chris Ninham,
31
+ Laslo Ruhberg.
32
+
33
+
34
+ ## 1.15.0 (2026-06-07)
35
+
36
+ ### Major changes
37
+
38
+ - `array_namespace` can now be used under `torch.compile`.
39
+ - The build system has changed from `setuptools` to `meson-python`.
40
+ Projects vendoring array-api-compat inside a meson project can now
41
+ rely on the in-tree meson project definition, which exposes the Python
42
+ sources via the `sources` variable. For example:
43
+ ```meson
44
+ array_api_compat = subproject('array_api_compat')
45
+ array_api_compat_sources = array_api_compat.get_variable('sources')
46
+ foreach prefix, files : array_api_compat_sources
47
+ py3.install_sources(files, subdir: external_dir / prefix)
48
+ endforeach
49
+ ```
50
+
51
+ ### Minor changes
52
+
53
+ - `torch.round` now supports complex input.
54
+ - `torch.arange` now works around missing dtype implementations instead of raising
55
+ an exception.
56
+
57
+ Bug fixes:
58
+ - `np.matrix` instances are no longer considered to be standard array objects.
59
+ - `torch.meshgrid` now correctly handles the case of no input arrays.
60
+
61
+ ### Contributors
62
+
63
+ The following users contributed to this release:
64
+
65
+ Lucas Colley,
66
+ Evgeni Burovski,
67
+ Chris Ninham,
68
+ Dimitri Papadopoulos Orfanos.
69
+
3
70
  ## 1.14.0 (2026-02-26)
4
71
 
5
72
  ### Major changes
@@ -257,7 +324,7 @@ Thomas Li
257
324
  than setting the conjugation bit, as arrays with the conjugation bit set do
258
325
  not support some APIs.
259
326
 
260
- - `torch.sign` is now wrapped to support complex numbers and propogate nans
327
+ - `torch.sign` is now wrapped to support complex numbers and propagate nans
261
328
  properly.
262
329
 
263
330
  ### Minor Changes
@@ -44,15 +44,14 @@
44
44
 
45
45
  - [ ] **Update the version.**
46
46
 
47
- You must edit
47
+ You must edit the version in:
48
48
 
49
49
  ```
50
50
  array_api_compat/__init__.py
51
+ pyproject.toml
52
+ meson.build
51
53
  ```
52
54
 
53
- and update the version (the version is not computed from the tag because
54
- that would break vendorability).
55
-
56
55
  - [ ] **Update the [changelog](../changelog.md).**
57
56
 
58
57
  Edit
@@ -100,7 +99,7 @@
100
99
  docs update (the docs are published automatically from the sources on
101
100
  `main`).
102
101
 
103
- - [ ] **Bump the `__version__` attribute in `__init__.py`**
102
+ - [ ] **Bump the version in all locations mentioned above**
104
103
 
105
104
  After an M.N.0 release, further development is towards version `M.(N+1).0`, thus the main branch's
106
105
  version is `M.(N+1).0.dev0`.
@@ -10,8 +10,9 @@ that is not strictly required by the standard. To run these tests, install the
10
10
  dependencies from the `dev` optional group (array-api-compat has [no hard
11
11
  runtime dependencies](no-dependencies)).
12
12
 
13
- array-api-tests is run against all supported libraries are tested on CI
14
- ([except for JAX](jax-support) and [Sparse](sparse-support)). This is achieved
13
+ The array-api-tests suite is run against all supported libraries on CI
14
+ ([except for JAX](jax-support), [mparray](mparray-support), and
15
+ [Sparse](sparse-support)). This is achieved
15
16
  by a [reusable GitHub Actions
16
17
  Workflow](https://github.com/data-apis/array-api-compat/blob/main/.github/workflows/array-api-tests.yml).
17
18
  Most libraries have tests that must be xfailed or skipped for various reasons.
@@ -49,8 +49,10 @@ yet.
49
49
  .. autofunction:: is_torch_array
50
50
  .. autofunction:: is_dask_array
51
51
  .. autofunction:: is_jax_array
52
+ .. autofunction:: is_mparray_array
52
53
  .. autofunction:: is_pydata_sparse_array
53
54
  .. autofunction:: is_ndonnx_array
55
+ .. autofunction:: is_dpnp_array
54
56
  .. autofunction:: is_writeable_array
55
57
  .. autofunction:: is_lazy_array
56
58
  .. autofunction:: is_numpy_namespace
@@ -58,6 +60,8 @@ yet.
58
60
  .. autofunction:: is_torch_namespace
59
61
  .. autofunction:: is_dask_namespace
60
62
  .. autofunction:: is_jax_namespace
63
+ .. autofunction:: is_mparray_namespace
61
64
  .. autofunction:: is_pydata_sparse_namespace
62
65
  .. autofunction:: is_ndonnx_namespace
66
+ .. autofunction:: is_dpnp_namespace
63
67
  .. autofunction:: is_array_api_strict_namespace
@@ -2,7 +2,8 @@
2
2
 
3
3
  This is a small wrapper around common array libraries that is compatible with
4
4
  the [Array API standard](https://data-apis.org/array-api/latest/). Currently,
5
- NumPy, CuPy, PyTorch, Dask, JAX, ndonnx, and Sparse are supported. If you want
5
+ NumPy, CuPy, PyTorch, Dask, JAX, mparray, ndonnx, Sparse and dpnp are
6
+ supported. If you want
6
7
  support for other array libraries, or if you encounter any issues, please
7
8
  [open an issue](https://github.com/data-apis/array-api-compat/issues).
8
9
 
@@ -61,12 +62,11 @@ import array_api_compat.dask as da
61
62
  ```
62
63
 
63
64
  ```{note}
64
- There are no `array_api_compat` submodules for JAX, sparse, or ndonnx. These
65
- support for these libraries is contained in the libraries themselves (JAX
66
- support is in the `jax.numpy` module in JAX v0.4.32 or newer, and in the
67
- `jax.experimental.array_api` module for older JAX versions). The
68
- array-api-compat support for these libraries consists of supporting them in
69
- the [helper functions](helper-functions).
65
+ There are no `array_api_compat` submodules for JAX, mparray, sparse, or ndonnx.
66
+ These libraries provide their own Array API support. (JAX provides it through
67
+ `jax.numpy` in JAX v0.4.32+ or `jax.experimental.array_api` in older versions.)
68
+ array-api-compat supports these libraries through the
69
+ [helper functions](helper-functions).
70
70
  ```
71
71
 
72
72
  Each will include all the functions from the normal NumPy/CuPy/PyTorch/dask.array
@@ -100,6 +100,16 @@ Unlike the other libraries supported here, JAX array API support is contained
100
100
  entirely in the JAX library. The JAX array API support is tracked at
101
101
  https://github.com/google/jax/issues/18353.
102
102
 
103
+ (mparray-support)=
104
+ ## [mparray](https://github.com/mdhaber/mparray)
105
+
106
+ mparray implements the Array API directly, so there is no
107
+ `array_api_compat.mparray` wrapper. `array_namespace()` returns the native
108
+ `mparray` namespace, and compatibility support consists of library
109
+ detection and generic helper functions. mparray currently supports the
110
+ `2025.12` version of the standard and only the `"cpu"` device, so
111
+ `to_device()` follows NumPy's CPU-only behavior.
112
+
103
113
  ## [Dask](https://www.dask.org/)
104
114
 
105
115
  If you're using dask with numpy, many of the same limitations that apply to numpy
@@ -132,6 +142,11 @@ Similar to JAX, `sparse` Array API support is contained directly in `sparse`.
132
142
 
133
143
  Similar to JAX, `ndonnx` Array API support is contained directly in `ndonnx`.
134
144
 
145
+ (dpnp-support)=
146
+ ## [dpnp](https://github.com/IntelPython/dpnp)
147
+
148
+ Similar to JAX, `dpnp` Array API support is contained directly in `dpnp`.
149
+
135
150
  (array-api-strict-support)=
136
151
  ## [array-api-strict](https://data-apis.org/array-api-strict/)
137
152