Skip to content

Commit 3509c43

Browse files
authored
Merge branch 'master' into update-github-actions-for-2025-release
2 parents b9366a4 + 06f6e33 commit 3509c43

File tree

106 files changed

+6566
-433
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+6566
-433
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212
GH_BOT_NAME: 'github-actions[bot]'
1313
GH_BOT_EMAIL: 'github-actions[bot]@users.noreply.github.com'
1414
GH_EVENT_OPEN_PR_UPSTREAM: ${{ github.event_name == 'pull_request' && github.event.action != 'closed' &&
15-
github.event.pull_request && !github.event.pull_request.head.repo.fork }}
15+
github.event.pull_request && !github.event.pull_request.base.repo.fork }}
1616
GH_EVENT_PUSH_UPSTREAM: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' &&
1717
github.event.ref == 'refs/heads/master' && github.event.repository && !github.event.repository.fork }}
1818
PUBLISH_DIR: doc/_build/html/
@@ -226,7 +226,7 @@ jobs:
226226
clean:
227227
if: |
228228
github.event_name == 'pull_request' && github.event.action == 'closed' &&
229-
github.event.pull_request && !github.event.pull_request.head.repo.fork
229+
github.event.pull_request && !github.event.pull_request.base.repo.fork
230230
231231
needs: build-and-deploy
232232

.github/workflows/conda-package.yml

Lines changed: 4 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -19,52 +19,6 @@ env:
1919
RERUN_TESTS_ON_FAILURE: 'true'
2020
RUN_TESTS_MAX_ATTEMPTS: 2
2121
TEST_ENV_NAME: 'test'
22-
TEST_SCOPE: >-
23-
test_absolute.py
24-
test_amin_amax.py
25-
test_arithmetic.py
26-
test_arraycreation.py
27-
test_arraymanipulation.py
28-
test_bitwise.py
29-
test_copy.py
30-
test_counting.py
31-
test_fft.py
32-
test_fill.py
33-
test_flat.py
34-
test_histogram.py
35-
test_indexing.py
36-
test_linalg.py
37-
test_logic.py
38-
test_manipulation.py
39-
test_mathematical.py
40-
test_mixins.py
41-
test_nanfunctions.py
42-
test_ndarray.py
43-
test_outer.py
44-
test_product.py
45-
test_random_state.py
46-
test_search.py
47-
test_sort.py
48-
test_special.py
49-
test_statistics.py
50-
test_sum.py
51-
test_sycl_queue.py
52-
test_umath.py
53-
test_usm_type.py
54-
third_party/cupy/core_tests
55-
third_party/cupy/fft_tests
56-
third_party/cupy/creation_tests
57-
third_party/cupy/indexing_tests
58-
third_party/cupy/lib_tests
59-
third_party/cupy/linalg_tests
60-
third_party/cupy/logic_tests
61-
third_party/cupy/manipulation_tests
62-
third_party/cupy/math_tests
63-
third_party/cupy/sorting_tests
64-
third_party/cupy/statistics_tests/test_histogram.py
65-
third_party/cupy/statistics_tests/test_meanvar.py
66-
third_party/cupy/test_ndim.py
67-
third_party/cupy/test_type_routines.py
6822
VER_JSON_NAME: 'version.json'
6923
VER_SCRIPT1: "import json; f = open('version.json', 'r'); j = json.load(f); f.close(); "
7024
VER_SCRIPT2: "d = j['dpnp'][0]; print('='.join((d[s] for s in ('version', 'build'))))"
@@ -261,7 +215,7 @@ jobs:
261215
- name: Run tests
262216
if: env.RERUN_TESTS_ON_FAILURE != 'true'
263217
run: |
264-
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
218+
python -m pytest -q -ra --disable-warnings -vv .
265219
working-directory: ${{ env.tests-path }}
266220

267221
- name: Run tests
@@ -277,7 +231,7 @@ jobs:
277231
. $CONDA/etc/profile.d/conda.sh
278232
conda activate ${{ env.TEST_ENV_NAME }}
279233
cd ${{ env.tests-path }}
280-
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
234+
python -m pytest -q -ra --disable-warnings -vv .
281235
282236
test_windows:
283237
name: Test ['windows-2019', python='${{ matrix.python }}']
@@ -420,7 +374,7 @@ jobs:
420374
- name: Run tests
421375
if: env.RERUN_TESTS_ON_FAILURE != 'true'
422376
run: |
423-
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
377+
python -m pytest -q -ra --disable-warnings -vv .
424378
working-directory: ${{ env.tests-path }}
425379

426380
- name: Run tests
@@ -435,7 +389,7 @@ jobs:
435389
command: >-
436390
mamba activate ${{ env.TEST_ENV_NAME }}
437391
& cd ${{ env.tests-path }}
438-
& python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
392+
& python -m pytest -q -ra --disable-warnings -vv .
439393
440394
upload:
441395
name: Upload ['${{ matrix.os }}', python='${{ matrix.python }}']

.github/workflows/generate_coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
conda activate coverage
112112
[ -f /opt/intel/oneapi/setvars.sh ] && source /opt/intel/oneapi/setvars.sh
113113
git clean -fxd
114-
python scripts/gen_coverage.py --pytest-opts="--ignore tests/test_random.py" --verbose
114+
python scripts/gen_coverage.py --verbose
115115
116116
- name: Total number of coverage attempts
117117
run: |

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ repos:
5252
rev: 24.4.2
5353
hooks:
5454
- id: black
55-
args: ["--check", "--diff", "--color"]
5655
- repo: https://github.com/pycqa/isort
5756
rev: 5.13.2
5857
hooks:

doc/reference/binary.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Bit-wise operations
2-
=================
2+
===================
33

44
.. https://numpy.org/doc/stable/reference/routines.bitwise.html
55
@@ -22,7 +22,6 @@ Element-wise bit operations
2222
dpnp.bitwise_right_shift
2323
dpnp.bitwise_count
2424

25-
2625
Bit packing
2726
-----------
2827

@@ -33,7 +32,6 @@ Bit packing
3332
dpnp.packbits
3433
dpnp.unpackbits
3534

36-
3735
Output formatting
3836
-----------------
3937

doc/reference/linalg.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ Other matrix operations
8787
-----------------------
8888
.. autosummary::
8989
:toctree: generated/
90+
:nosignatures:
9091

9192
dpnp.diagonal
9293
dpnp.linalg.diagonal (Array API compatible)
@@ -96,5 +97,6 @@ Exceptions
9697
----------
9798
.. autosummary::
9899
:toctree: generated/
100+
:nosignatures:
99101

100102
dpnp.linalg.linAlgError

doc/reference/ndarray.rst

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ Array conversion
134134

135135
dpnp.ndarray.item
136136
dpnp.ndarray.tolist
137-
dpnp.ndarray.itemset
138137
dpnp.ndarray.tostring
139138
dpnp.ndarray.tobytes
140139
dpnp.ndarray.tofile
@@ -250,7 +249,7 @@ Comparison operators:
250249
dpnp.ndarray.__eq__
251250
dpnp.ndarray.__ne__
252251

253-
Truth value of an array (:func:`bool()`):
252+
Truth value of an array (:class:`bool() <bool>`):
254253

255254
.. autosummary::
256255
:toctree: generated/
@@ -261,11 +260,11 @@ Truth value of an array (:func:`bool()`):
261260

262261
Truth-value testing of an array invokes
263262
:meth:`dpnp.ndarray.__bool__`, which raises an error if the number of
264-
elements in the array is larger than 1, because the truth value
263+
elements in the array is not 1, because the truth value
265264
of such arrays is ambiguous. Use :meth:`.any() <dpnp.ndarray.any>` and
266265
:meth:`.all() <dpnp.ndarray.all>` instead to be clear about what is meant
267-
in such cases. (If the number of elements is 0, the array evaluates
268-
to ``False``.)
266+
in such cases. (If you wish to check for whether an array is empty,
267+
use for example ``.size > 0``.)
269268

270269

271270
Unary operations:
@@ -301,6 +300,26 @@ Arithmetic:
301300
dpnp.ndarray.__xor__
302301

303302

303+
Arithmetic, reflected:
304+
305+
.. autosummary::
306+
:toctree: generated/
307+
:nosignatures:
308+
309+
dpnp.ndarray.__radd__
310+
dpnp.ndarray.__rsub__
311+
dpnp.ndarray.__rmul__
312+
dpnp.ndarray.__rtruediv__
313+
dpnp.ndarray.__rfloordiv__
314+
dpnp.ndarray.__rmod__
315+
dpnp.ndarray.__rpow__
316+
dpnp.ndarray.__rlshift__
317+
dpnp.ndarray.__rrshift__
318+
dpnp.ndarray.__rand__
319+
dpnp.ndarray.__ror__
320+
dpnp.ndarray.__rxor__
321+
322+
304323
Arithmetic, in-place:
305324

306325
.. autosummary::
@@ -327,6 +346,8 @@ Matrix Multiplication:
327346
:toctree: generated/
328347

329348
dpnp.ndarray.__matmul__
349+
dpnp.ndarray.__rmatmul__
350+
dpnp.ndarray.__imatmul__
330351

331352

332353
Special methods

dpnp/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ add_subdirectory(backend/extensions/fft)
5858
add_subdirectory(backend/extensions/lapack)
5959
add_subdirectory(backend/extensions/vm)
6060
add_subdirectory(backend/extensions/ufunc)
61+
add_subdirectory(backend/extensions/statistics)
6162

6263
add_subdirectory(dpnp_algo)
6364
add_subdirectory(dpnp_utils)

dpnp/backend/extensions/blas/dot.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
#pragma once
2727

28+
#include <stdexcept>
29+
2830
#include "dot_common.hpp"
2931

3032
namespace dpnp::extensions::blas

dpnp/backend/extensions/blas/dotc.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
#pragma once
2727

28+
#include <stdexcept>
29+
2830
#include "dot_common.hpp"
2931

3032
namespace dpnp::extensions::blas

0 commit comments

Comments
 (0)