array-api-compat 1.15.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 (106) hide show
  1. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.github/workflows/array-api-tests.yml +3 -3
  2. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.github/workflows/dependabot-auto-merge.yml +1 -1
  3. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.github/workflows/docs-build.yml +3 -3
  4. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.github/workflows/docs-deploy.yml +3 -3
  5. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.github/workflows/publish-package.yml +7 -7
  6. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.github/workflows/ruff.yml +2 -2
  7. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.github/workflows/tests.yml +15 -4
  8. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/CHANGELOG.md +31 -0
  9. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/PKG-INFO +3 -2
  10. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/README.md +2 -1
  11. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/dask-xfails.txt +3 -0
  12. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/docs/changelog.md +31 -0
  13. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/docs/dev/releasing.md +1 -1
  14. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/docs/dev/tests.md +3 -2
  15. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/docs/helper-functions.rst +4 -0
  16. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/docs/index.md +7 -7
  17. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/docs/supported-array-libraries.md +15 -0
  18. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/meson.build +2 -1
  19. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/numpy-1-22-xfails.txt +3 -0
  20. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/numpy-1-26-xfails.txt +2 -1
  21. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/pyproject.toml +4 -2
  22. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/__init__.py +2 -2
  23. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/common/_fft.py +12 -12
  24. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/common/_helpers.py +144 -1
  25. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/numpy/_aliases.py +112 -3
  26. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/torch/_aliases.py +41 -20
  27. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/torch/_info.py +0 -3
  28. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/tests/_helpers.py +1 -1
  29. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/tests/test_array_namespace.py +5 -1
  30. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/tests/test_common.py +13 -2
  31. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/tests/test_cupy.py +11 -0
  32. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/tests/test_no_dependencies.py +1 -1
  33. array_api_compat-1.16.0/tests/test_numpy.py +156 -0
  34. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/tests/test_torch.py +60 -0
  35. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/torch-xfails.txt +0 -23
  36. array_api_compat-1.15.0/tests/test_numpy.py +0 -19
  37. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.git-blame-ignore-revs +0 -0
  38. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.gitattributes +0 -0
  39. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.github/dependabot.yml +0 -0
  40. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.github/workflows/array-api-tests-dask.yml +0 -0
  41. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.github/workflows/array-api-tests-numpy-1-22.yml +0 -0
  42. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.github/workflows/array-api-tests-numpy-1-26.yml +0 -0
  43. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.github/workflows/array-api-tests-numpy-dev.yml +0 -0
  44. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.github/workflows/array-api-tests-numpy-latest.yml +0 -0
  45. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.github/workflows/array-api-tests-torch.yml +0 -0
  46. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/.gitignore +0 -0
  47. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/CONTRIBUTING.md +0 -0
  48. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/LICENSE +0 -0
  49. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/cupy-xfails.txt +0 -0
  50. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/dask-skips.txt +0 -0
  51. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/docs/Makefile +0 -0
  52. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/docs/_static/custom.css +0 -0
  53. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/docs/_static/favicon.png +0 -0
  54. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/docs/conf.py +0 -0
  55. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/docs/dev/implementation-notes.md +0 -0
  56. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/docs/dev/index.md +0 -0
  57. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/docs/dev/special-considerations.md +0 -0
  58. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/docs/make.bat +0 -0
  59. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/numpy-dev-xfails.txt +0 -0
  60. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/numpy-skips.txt +0 -0
  61. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/numpy-xfails.txt +0 -0
  62. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/pixi.lock +0 -0
  63. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/pixi.toml +0 -0
  64. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/_internal.py +0 -0
  65. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/common/__init__.py +0 -0
  66. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/common/_aliases.py +0 -0
  67. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/common/_linalg.py +0 -0
  68. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/common/_typing.py +0 -0
  69. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/cupy/__init__.py +0 -0
  70. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/cupy/_aliases.py +0 -0
  71. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/cupy/_info.py +0 -0
  72. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/cupy/_typing.py +0 -0
  73. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/cupy/fft.py +0 -0
  74. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/cupy/linalg.py +0 -0
  75. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/dask/__init__.py +0 -0
  76. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/dask/array/__init__.py +0 -0
  77. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/dask/array/_aliases.py +0 -0
  78. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/dask/array/_info.py +0 -0
  79. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/dask/array/fft.py +0 -0
  80. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/dask/array/linalg.py +0 -0
  81. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/numpy/__init__.py +0 -0
  82. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/numpy/_info.py +0 -0
  83. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/numpy/_typing.py +0 -0
  84. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/numpy/fft.py +0 -0
  85. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/numpy/linalg.py +0 -0
  86. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/py.typed +0 -0
  87. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/torch/__init__.py +0 -0
  88. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/torch/_typing.py +0 -0
  89. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/torch/fft.py +0 -0
  90. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/src/array_api_compat/torch/linalg.py +0 -0
  91. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/test_cupy.sh +0 -0
  92. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/tests/__init__.py +0 -0
  93. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/tests/meson.build +0 -0
  94. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/tests/test_all.py +0 -0
  95. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/tests/test_copies_or_views.py +0 -0
  96. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/tests/test_dask.py +0 -0
  97. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/tests/test_isdtype.py +0 -0
  98. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/tests/test_jax.py +0 -0
  99. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/torch-skips.txt +0 -0
  100. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/vendor_tests/__init__.py +0 -0
  101. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/vendor_tests/meson.build +0 -0
  102. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/vendor_tests/test_vendoring.py +0 -0
  103. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/vendor_tests/uses_cupy.py +0 -0
  104. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/vendor_tests/uses_dask.py +0 -0
  105. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/vendor_tests/uses_numpy.py +0 -0
  106. {array_api_compat-1.15.0 → array_api_compat-1.16.0}/vendor_tests/uses_torch.py +0 -0
@@ -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
 
@@ -13,7 +13,7 @@ jobs:
13
13
  steps:
14
14
  - name: Dependabot metadata
15
15
  id: metadata
16
- uses: dependabot/fetch-metadata@v3
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
@@ -6,8 +6,8 @@ jobs:
6
6
  docs-build:
7
7
  runs-on: ubuntu-latest
8
8
  steps:
9
- - uses: actions/checkout@v6
10
- - uses: actions/setup-python@v6
9
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
10
+ - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
11
11
  - name: Install Dependencies
12
12
  run: |
13
13
  python -m pip install --upgrade pip
@@ -18,7 +18,7 @@ jobs:
18
18
  cd docs
19
19
  make html
20
20
  - name: Upload Artifact
21
- uses: actions/upload-artifact@v7
21
+ uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
22
22
  with:
23
23
  name: docs-build
24
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@v21
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 }}
@@ -30,12 +30,12 @@ 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
 
@@ -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@v7
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@v8
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.14.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.14.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@v3
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
 
@@ -1,5 +1,36 @@
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
+
3
34
  ## 1.15.0 (2026-06-07)
4
35
 
5
36
  ### Major changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: array-api-compat
3
- Version: 1.15.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
@@ -22,7 +22,8 @@ Description-Content-Type: text/markdown
22
22
 
23
23
  This is a small wrapper around common array libraries that is compatible with
24
24
  the [Array API standard](https://data-apis.org/array-api/latest/). Currently,
25
- 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
26
27
  support for other array libraries, or if you encounter any issues, please [open
27
28
  an issue](https://github.com/data-apis/array-api-compat/issues).
28
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
 
@@ -178,3 +178,6 @@ array_api_tests/test_special_cases.py::test_unary[acosh(real(x_i) is +0 and imag
178
178
  array_api_tests/test_dlpack.py::test_dlpack_device
179
179
  array_api_tests/test_dlpack.py::test_dunder_dlpack
180
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,36 @@
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
+
3
34
  ## 1.15.0 (2026-06-07)
4
35
 
5
36
  ### Major changes
@@ -99,7 +99,7 @@
99
99
  docs update (the docs are published automatically from the sources on
100
100
  `main`).
101
101
 
102
- - [ ] **Bump the `__version__` attribute in `__init__.py`**
102
+ - [ ] **Bump the version in all locations mentioned above**
103
103
 
104
104
  After an M.N.0 release, further development is towards version `M.(N+1).0`, thus the main branch's
105
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
 
@@ -1,6 +1,6 @@
1
1
  project(
2
2
  'array_api_compat',
3
- version: '1.15.0',
3
+ version: '1.16.0',
4
4
  license: 'MIT',
5
5
  license_files: ['LICENSE']
6
6
  )
@@ -11,6 +11,7 @@ sources_raw = {
11
11
  'array_api_compat': [
12
12
  'src/array_api_compat/__init__.py',
13
13
  'src/array_api_compat/_internal.py',
14
+ 'src/array_api_compat/py.typed',
14
15
  ],
15
16
 
16
17
  'array_api_compat/common': [
@@ -196,3 +196,6 @@ array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +infinity an
196
196
  array_api_tests/test_dlpack.py::test_dlpack_device
197
197
  array_api_tests/test_dlpack.py::test_dunder_dlpack
198
198
  array_api_tests/test_dlpack.py::test_from_dlpack
199
+
200
+ # reshape copy=False code path does not handle scalars under NumPy < 2
201
+ array_api_tests/test_manipulation_functions.py::test_reshape
@@ -90,4 +90,5 @@ array_api_tests/test_dlpack.py::test_dlpack_device
90
90
  array_api_tests/test_dlpack.py::test_dunder_dlpack
91
91
  array_api_tests/test_dlpack.py::test_from_dlpack
92
92
 
93
-
93
+ # reshape copy=False code path does not handle scalars under NumPy < 2
94
+ array_api_tests/test_manipulation_functions.py::test_reshape
@@ -4,7 +4,7 @@ build-backend = "mesonpy"
4
4
 
5
5
  [project]
6
6
  name = "array-api-compat"
7
- version = "1.15.0"
7
+ version = "1.16.0"
8
8
  description = "A wrapper around NumPy and other array libraries to make them compatible with the Array API standard"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -32,6 +32,7 @@ repository = "https://github.com/data-apis/array-api-compat/"
32
32
  cupy = ["cupy"]
33
33
  dask = ["dask>=2024.9.0"]
34
34
  jax = ["jax"]
35
+ mparray = ["mparray"]
35
36
  # Note: array-api-compat follows scikit-learn minimum dependencies, which support
36
37
  # much older versions of NumPy than what SPEC0 recommends.
37
38
  numpy = ["numpy>=1.22"]
@@ -50,6 +51,7 @@ dev = [
50
51
  "array-api-strict",
51
52
  "dask[array]>=2024.9.0",
52
53
  "jax[cpu]",
54
+ "mparray; python_version >= '3.11'",
53
55
  "ndonnx",
54
56
  "numpy>=1.22",
55
57
  "pytest",
@@ -105,7 +107,7 @@ warn_unused_ignores = true
105
107
  warn_unreachable = true
106
108
 
107
109
  [[tool.mypy.overrides]]
108
- module = ["cupy.*", "cupy_backends.*", "dask.*", "jax.*", "ndonnx.*", "sparse.*", "torch.*"]
110
+ module = ["cupy.*", "cupy_backends.*", "dask.*", "jax.*", "mparray.*", "ndonnx.*", "sparse.*", "torch.*"]
109
111
  ignore_missing_imports = true
110
112
 
111
113
 
@@ -1,7 +1,7 @@
1
1
  """
2
2
  NumPy Array API compatibility library
3
3
 
4
- This is a small wrapper around NumPy, CuPy, JAX, sparse and others that are
4
+ This is a small wrapper around NumPy, CuPy, JAX, mparray, sparse and others that are
5
5
  compatible with the Array API standard https://data-apis.org/array-api/latest/.
6
6
  See also NEP 47 https://numpy.org/neps/nep-0047-array-api-standard.html.
7
7
 
@@ -17,6 +17,6 @@ to ensure they are not using functionality outside of the standard, but prefer
17
17
  this implementation for the default when working with NumPy arrays.
18
18
 
19
19
  """
20
- __version__ = '1.15.0'
20
+ __version__ = '1.16.0'
21
21
 
22
22
  from .common import * # noqa: F403
@@ -21,7 +21,7 @@ def fft(
21
21
  ) -> Array:
22
22
  res = xp.fft.fft(x, n=n, axis=axis, norm=norm)
23
23
  if x.dtype in [xp.float32, xp.complex64]:
24
- return res.astype(xp.complex64)
24
+ return res.astype(xp.complex64, copy=False)
25
25
  return res
26
26
 
27
27
  def ifft(
@@ -35,7 +35,7 @@ def ifft(
35
35
  ) -> Array:
36
36
  res = xp.fft.ifft(x, n=n, axis=axis, norm=norm)
37
37
  if x.dtype in [xp.float32, xp.complex64]:
38
- return res.astype(xp.complex64)
38
+ return res.astype(xp.complex64, copy=False)
39
39
  return res
40
40
 
41
41
  def fftn(
@@ -49,7 +49,7 @@ def fftn(
49
49
  ) -> Array:
50
50
  res = xp.fft.fftn(x, s=s, axes=axes, norm=norm)
51
51
  if x.dtype in [xp.float32, xp.complex64]:
52
- return res.astype(xp.complex64)
52
+ return res.astype(xp.complex64, copy=False)
53
53
  return res
54
54
 
55
55
  def ifftn(
@@ -63,7 +63,7 @@ def ifftn(
63
63
  ) -> Array:
64
64
  res = xp.fft.ifftn(x, s=s, axes=axes, norm=norm)
65
65
  if x.dtype in [xp.float32, xp.complex64]:
66
- return res.astype(xp.complex64)
66
+ return res.astype(xp.complex64, copy=False)
67
67
  return res
68
68
 
69
69
  def rfft(
@@ -77,7 +77,7 @@ def rfft(
77
77
  ) -> Array:
78
78
  res = xp.fft.rfft(x, n=n, axis=axis, norm=norm)
79
79
  if x.dtype == xp.float32:
80
- return res.astype(xp.complex64)
80
+ return res.astype(xp.complex64, copy=False)
81
81
  return res
82
82
 
83
83
  def irfft(
@@ -91,7 +91,7 @@ def irfft(
91
91
  ) -> Array:
92
92
  res = xp.fft.irfft(x, n=n, axis=axis, norm=norm)
93
93
  if x.dtype == xp.complex64:
94
- return res.astype(xp.float32)
94
+ return res.astype(xp.float32, copy=False)
95
95
  return res
96
96
 
97
97
  def rfftn(
@@ -105,7 +105,7 @@ def rfftn(
105
105
  ) -> Array:
106
106
  res = xp.fft.rfftn(x, s=s, axes=axes, norm=norm)
107
107
  if x.dtype == xp.float32:
108
- return res.astype(xp.complex64)
108
+ return res.astype(xp.complex64, copy=False)
109
109
  return res
110
110
 
111
111
  def irfftn(
@@ -119,7 +119,7 @@ def irfftn(
119
119
  ) -> Array:
120
120
  res = xp.fft.irfftn(x, s=s, axes=axes, norm=norm)
121
121
  if x.dtype == xp.complex64:
122
- return res.astype(xp.float32)
122
+ return res.astype(xp.float32, copy=False)
123
123
  return res
124
124
 
125
125
  def hfft(
@@ -133,7 +133,7 @@ def hfft(
133
133
  ) -> Array:
134
134
  res = xp.fft.hfft(x, n=n, axis=axis, norm=norm)
135
135
  if x.dtype in [xp.float32, xp.complex64]:
136
- return res.astype(xp.float32)
136
+ return res.astype(xp.float32, copy=False)
137
137
  return res
138
138
 
139
139
  def ihfft(
@@ -147,7 +147,7 @@ def ihfft(
147
147
  ) -> Array:
148
148
  res = xp.fft.ihfft(x, n=n, axis=axis, norm=norm)
149
149
  if x.dtype in [xp.float32, xp.complex64]:
150
- return res.astype(xp.complex64)
150
+ return res.astype(xp.complex64, copy=False)
151
151
  return res
152
152
 
153
153
  def fftfreq(
@@ -163,7 +163,7 @@ def fftfreq(
163
163
  raise ValueError(f"Unsupported device {device!r}")
164
164
  res = xp.fft.fftfreq(n, d=d)
165
165
  if dtype is not None:
166
- return res.astype(dtype)
166
+ return res.astype(dtype, copy=False)
167
167
  return res
168
168
 
169
169
  def rfftfreq(
@@ -179,7 +179,7 @@ def rfftfreq(
179
179
  raise ValueError(f"Unsupported device {device!r}")
180
180
  res = xp.fft.rfftfreq(n, d=d)
181
181
  if dtype is not None:
182
- return res.astype(dtype)
182
+ return res.astype(dtype, copy=False)
183
183
  return res
184
184
 
185
185
  def fftshift(