Skip to content

Commit 25243e2

Browse files
Merge branch 'master' into correlate_fft
2 parents 7bd0273 + 0e479cc commit 25243e2

33 files changed

+1737
-792
lines changed

.github/workflows/array-api-skips.txt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,6 @@ array_api_tests/test_signatures.py::test_func_signature[unique_counts]
1717
array_api_tests/test_signatures.py::test_func_signature[unique_inverse]
1818
array_api_tests/test_signatures.py::test_func_signature[unique_values]
1919

20-
# no '__array_namespace_info__' function
21-
array_api_tests/test_has_names.py::test_has_names[info-__array_namespace_info__]
22-
array_api_tests/test_inspection_functions.py::test_array_namespace_info
23-
array_api_tests/test_inspection_functions.py::test_array_namespace_info_dtypes
24-
array_api_tests/test_searching_functions.py::test_searchsorted
25-
array_api_tests/test_signatures.py::test_func_signature[__array_namespace_info__]
26-
array_api_tests/test_signatures.py::test_info_func_signature[capabilities]
27-
array_api_tests/test_signatures.py::test_info_func_signature[default_device]
28-
array_api_tests/test_signatures.py::test_info_func_signature[default_dtypes]
29-
array_api_tests/test_signatures.py::test_info_func_signature[devices]
30-
array_api_tests/test_signatures.py::test_info_func_signature[dtypes]
31-
3220
# do not return a namedtuple
3321
array_api_tests/test_linalg.py::test_eigh
3422
array_api_tests/test_linalg.py::test_slogdet
@@ -50,8 +38,5 @@ array_api_tests/test_signatures.py::test_func_signature[var]
5038
array_api_tests/test_linalg.py::test_vecdot
5139
array_api_tests/test_linalg.py::test_linalg_vecdot
5240

53-
# tuple index out of range
54-
array_api_tests/test_linalg.py::test_linalg_matmul
55-
5641
# arrays have different values
5742
array_api_tests/test_linalg.py::test_linalg_tensordot

.github/workflows/build-sphinx.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
- name: Setup miniconda
105105
id: setup_miniconda
106106
continue-on-error: true
107-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
107+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
108108
with:
109109
miniforge-version: latest
110110
use-mamba: 'true'
@@ -115,7 +115,7 @@ jobs:
115115

116116
- name: ReSetup miniconda
117117
if: steps.setup_miniconda.outcome == 'failure'
118-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
118+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
119119
with:
120120
miniforge-version: latest
121121
use-mamba: 'true'
@@ -223,6 +223,7 @@ jobs:
223223
PR_NUM: ${{ github.event.number }}
224224
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
225225
with:
226+
message-id: url_to_docs
226227
message: |
227228
View rendered docs @ https://intelpython.github.io/dpnp/pull/${{ env.PR_NUM }}/index.html
228229
allow-repeats: false

.github/workflows/check-mkl-interfaces.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
fetch-depth: 0
6060

6161
- name: Setup miniconda
62-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
62+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
6363
with:
6464
miniforge-version: latest
6565
use-mamba: 'true'
@@ -167,7 +167,7 @@ jobs:
167167
ls -la ${{ env.onemkl-source-dir }}
168168
169169
- name: Setup miniconda
170-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
170+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
171171
with:
172172
miniforge-version: latest
173173
use-mamba: 'true'

.github/workflows/conda-package.yml

Lines changed: 25 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ env:
1414
# CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
1515
CHANNELS: '-c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels'
1616
CONDA_BUILD_INDEX_ENV_PY_VER: '3.12' # conda does not support python 3.13
17-
CONDA_BUILD_VERSION: '24.11.2'
17+
CONDA_BUILD_VERSION: '25.1.1'
1818
CONDA_INDEX_VERSION: '0.5.0'
1919
RERUN_TESTS_ON_FAILURE: 'true'
2020
RUN_TESTS_MAX_ATTEMPTS: 2
@@ -57,7 +57,7 @@ jobs:
5757
- name: Setup miniconda
5858
id: setup_miniconda
5959
continue-on-error: true
60-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
60+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
6161
with:
6262
miniforge-version: latest
6363
use-mamba: 'true'
@@ -68,7 +68,7 @@ jobs:
6868

6969
- name: ReSetup miniconda
7070
if: steps.setup_miniconda.outcome == 'failure'
71-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
71+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
7272
with:
7373
miniforge-version: latest
7474
use-mamba: 'true'
@@ -101,7 +101,7 @@ jobs:
101101
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
102102
with:
103103
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
104-
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
104+
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda
105105

106106
- name: Upload wheels artifact
107107
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
@@ -129,7 +129,6 @@ jobs:
129129
env:
130130
channel-path: '${{ github.workspace }}/channel/'
131131
pkg-path-in-channel: '${{ github.workspace }}/channel/linux-64/'
132-
extracted-pkg-path: '${{ github.workspace }}/pkg/'
133132
ver-json-path: '${{ github.workspace }}/version.json'
134133

135134
steps:
@@ -139,15 +138,10 @@ jobs:
139138
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
140139
path: ${{ env.pkg-path-in-channel }}
141140

142-
- name: Extract package archive
143-
run: |
144-
mkdir -p ${{ env.extracted-pkg-path }}
145-
tar -xvf ${{ env.pkg-path-in-channel }}/${{ env.PACKAGE_NAME }}-*.tar.bz2 -C ${{ env.extracted-pkg-path }}
146-
147141
- name: Setup miniconda
148142
id: setup_miniconda
149143
continue-on-error: true
150-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
144+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
151145
with:
152146
miniforge-version: latest
153147
use-mamba: 'true'
@@ -158,7 +152,7 @@ jobs:
158152

159153
- name: ReSetup miniconda
160154
if: steps.setup_miniconda.outcome == 'failure'
161-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
155+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
162156
with:
163157
miniforge-version: latest
164158
use-mamba: 'true'
@@ -168,7 +162,8 @@ jobs:
168162
activate-environment: ${{ env.TEST_ENV_NAME }}
169163

170164
- name: Install conda-index
171-
run: mamba install conda-index=${{ env.CONDA_INDEX_VERSION }}
165+
run: |
166+
mamba install conda-index=${{ env.CONDA_INDEX_VERSION }}
172167
173168
- name: Create conda channel
174169
run: |
@@ -253,7 +248,6 @@ jobs:
253248
env:
254249
channel-path: '${{ github.workspace }}\channel\'
255250
pkg-path-in-channel: '${{ github.workspace }}\channel\win-64\'
256-
extracted-pkg-path: '${{ github.workspace }}\pkg'
257251
ver-json-path: '${{ github.workspace }}\version.json'
258252
workdir: '${{ github.workspace }}'
259253

@@ -264,22 +258,19 @@ jobs:
264258
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
265259
path: ${{ env.pkg-path-in-channel }}
266260

267-
- name: Extract package archive
261+
- name: Store a path to package archive
268262
run: |
269263
@echo on
270-
mkdir -p ${{ env.extracted-pkg-path }}
271264
272-
set SEARCH_SCRIPT="DIR ${{ env.pkg-path-in-channel }} /s/b | FINDSTR /r "dpnp-.*\.tar\.bz2""
265+
set SEARCH_SCRIPT="DIR ${{ env.pkg-path-in-channel }} /s/b | FINDSTR /r "dpnp-.*\.conda""
273266
FOR /F "tokens=* USEBACKQ" %%F IN (`%SEARCH_SCRIPT%`) DO (
274267
SET FULL_PACKAGE_PATH=%%F
275268
)
276269
echo FULL_PACKAGE_PATH: %FULL_PACKAGE_PATH%
277-
278-
python -c "import shutil; shutil.unpack_archive(r\"%FULL_PACKAGE_PATH%\", extract_dir=r\"${{ env.extracted-pkg-path }}\")"
279-
dir ${{ env.extracted-pkg-path }}
270+
(echo FULL_PACKAGE_PATH=%FULL_PACKAGE_PATH%) >> %GITHUB_ENV%
280271
281272
- name: Setup miniconda
282-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
273+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
283274
with:
284275
miniforge-version: latest
285276
use-mamba: 'true'
@@ -295,7 +286,8 @@ jobs:
295286
(echo CONDA_LIB_BIN_PATH=%CONDA_PREFIX%\Library\bin\) >> %GITHUB_ENV%
296287
297288
- name: Install conda-index
298-
run: mamba install conda-index=${{ env.CONDA_INDEX_VERSION }}
289+
run: |
290+
mamba install conda-index=${{ env.CONDA_INDEX_VERSION }}
299291
300292
- name: Create conda channel
301293
run: |
@@ -403,7 +395,7 @@ jobs:
403395
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
404396

405397
- name: Setup miniconda
406-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
398+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
407399
with:
408400
miniforge-version: latest
409401
use-mamba: 'true'
@@ -418,11 +410,11 @@ jobs:
418410
- name: Package version
419411
shell: bash -el {0}
420412
run: |
421-
echo "PACKAGE_VERSION=$(basename ${{ env.PACKAGE_NAME }}-*.tar.bz2 | sed 's/^${{ env.PACKAGE_NAME }}-\([^-]*\).*/\1/')" >> $GITHUB_ENV
413+
echo "PACKAGE_VERSION=$(basename ${{ env.PACKAGE_NAME }}-*.conda | sed 's/^${{ env.PACKAGE_NAME }}-\([^-]*\).*/\1/')" >> $GITHUB_ENV
422414
423415
- name: Upload
424416
run: |
425-
anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
417+
anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.conda
426418
env:
427419
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
428420

@@ -461,7 +453,6 @@ jobs:
461453
array-api-skips-file: '${{ github.workspace }}/dpnp/.github/workflows/array-api-skips.txt'
462454
channel-path: '${{ github.workspace }}/channel/'
463455
pkg-path-in-channel: '${{ github.workspace }}/channel/linux-64/'
464-
extracted-pkg-path: '${{ github.workspace }}/pkg/'
465456
ver-json-path: '${{ github.workspace }}/version.json'
466457

467458
steps:
@@ -471,15 +462,10 @@ jobs:
471462
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
472463
path: ${{ env.pkg-path-in-channel }}
473464

474-
- name: Extract package archive
475-
run: |
476-
mkdir -p ${{ env.extracted-pkg-path }}
477-
tar -xvf ${{ env.pkg-path-in-channel }}/${{ env.PACKAGE_NAME }}-*.tar.bz2 -C ${{ env.extracted-pkg-path }}
478-
479465
- name: Setup miniconda
480466
id: setup_miniconda
481467
continue-on-error: true
482-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
468+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
483469
with:
484470
miniforge-version: latest
485471
use-mamba: 'true'
@@ -490,7 +476,7 @@ jobs:
490476

491477
- name: ReSetup miniconda
492478
if: steps.setup_miniconda.outcome == 'failure'
493-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
479+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
494480
with:
495481
miniforge-version: latest
496482
use-mamba: 'true'
@@ -502,11 +488,13 @@ jobs:
502488
- name: Install conda-index
503489
id: install_conda_index
504490
continue-on-error: true
505-
run: mamba install conda-index=${{ env.CONDA_INDEX_VERSION }}
491+
run: |
492+
mamba install conda-index=${{ env.CONDA_INDEX_VERSION }}
506493
507494
- name: ReInstall conda-index
508495
if: steps.install_conda_index.outcome == 'failure'
509-
run: mamba install conda-index=${{ env.CONDA_INDEX_VERSION }}
496+
run: |
497+
mamba install conda-index=${{ env.CONDA_INDEX_VERSION }}
510498
511499
- name: Create conda channel
512500
run: |
@@ -612,9 +600,9 @@ jobs:
612600
if: ${{ github.event.pull_request && !github.event.pull_request.head.repo.fork }}
613601
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
614602
with:
603+
message-id: array_api_results
615604
message: |
616605
${{ env.MESSAGE }}
617-
refresh-message-position: true
618606
619607
cleanup_packages:
620608
name: Clean up anaconda packages
@@ -628,7 +616,7 @@ jobs:
628616
shell: bash -el {0}
629617

630618
steps:
631-
- uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
619+
- uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
632620
with:
633621
miniforge-version: latest
634622
use-mamba: 'true'

.github/workflows/cron-run-tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- name: Setup miniconda
6161
id: setup_miniconda
6262
continue-on-error: true
63-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
63+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
6464
with:
6565
miniforge-version: latest
6666
use-mamba: 'true'
@@ -71,7 +71,7 @@ jobs:
7171

7272
- name: ReSetup miniconda
7373
if: steps.setup_miniconda.outcome == 'failure'
74-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
74+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
7575
with:
7676
miniforge-version: latest
7777
use-mamba: 'true'

.github/workflows/generate_coverage.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- name: Setup miniconda
6565
id: setup_miniconda
6666
continue-on-error: true
67-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
67+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
6868
with:
6969
miniforge-version: latest
7070
use-mamba: 'true'
@@ -75,7 +75,7 @@ jobs:
7575

7676
- name: ReSetup miniconda
7777
if: steps.setup_miniconda.outcome == 'failure'
78-
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
78+
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
7979
with:
8080
miniforge-version: latest
8181
use-mamba: 'true'

.github/workflows/openssf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ jobs:
6868

6969
# Upload the results to GitHub's code scanning dashboard.
7070
- name: "Upload to code-scanning"
71-
uses: github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
71+
uses: github/codeql-action/upload-sarif@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
7272
with:
7373
sarif_file: results.sarif

conda-recipe/run_test.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ if not defined PYTHON (
3232

3333

3434
"%PYTHON%" -c "import dpnp; print(dpnp.__version__)"
35-
if errorlevel 1 exit 1
35+
if %errorlevel% neq 0 exit 1
3636

3737
"%PYTHON%" -m dpctl -f
38-
if errorlevel 1 exit 1
38+
if %errorlevel% neq 0 exit 1
3939

4040
"%PYTHON%" -m pytest -ra --pyargs dpnp
41-
if errorlevel 1 exit 1
41+
if %errorlevel% neq 0 exit 1

doc/reference/array_api.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.. _array-api-standard-compatibility:
2+
3+
.. https://numpy.org/doc/stable/reference/array_api.html
4+
5+
********************************
6+
Array API standard compatibility
7+
********************************
8+
9+
DPNP's main namespace as well as the :mod:`dpnp.fft` and :mod:`dpnp.linalg`
10+
namespaces are compatible with the
11+
`2023.12 version <https://data-apis.org/array-api/2023.12/index.html>`__
12+
of the Python array API standard.
13+
14+
Inspection
15+
==========
16+
17+
DPNP implements the `array API inspection utilities
18+
<https://data-apis.org/array-api/latest/API_specification/inspection.html>`__.
19+
These functions can be accessed via the ``__array_namespace_info__()``
20+
function, which returns a namespace containing the inspection utilities.
21+
22+
.. autosummary::
23+
:toctree: generated/
24+
:nosignatures:
25+
26+
dpnp.__array_namespace_info__

doc/reference/fft.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.. _routines.fft:
2+
3+
.. py:module:: dpnp.fft
4+
15
Discrete Fourier Transform
26
==========================
37

doc/reference/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ API reference of the Data Parallel Extension for NumPy*
3333
dtypes_table
3434
comparison
3535
misc
36+
array_api

doc/reference/linalg.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.. _routines.linalg:
2+
3+
.. py:module:: dpnp.linalg
4+
15
Linear algebra
26
==============
37

0 commit comments

Comments
 (0)