Skip to content

Commit 3146234

Browse files
Merge master into impl_of_interp
2 parents a65a1dd + 15ed961 commit 3146234

16 files changed

Lines changed: 43 additions & 43 deletions

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,3 @@ array_api_tests/test_operators_and_elementwise_functions.py::test_clip
66
# unexpected result is returned - unmute when dpctl-1986 is resolved
77
array_api_tests/test_operators_and_elementwise_functions.py::test_asin
88
array_api_tests/test_operators_and_elementwise_functions.py::test_asinh
9-
10-
# advanced indexing relating issues (waiting a fix from dpctl)
11-
array_api_tests/test_array_object.py::test_getitem_arrays_and_ints_1[1]
12-
array_api_tests/test_array_object.py::test_getitem_arrays_and_ints_1[None]
13-
array_api_tests/test_array_object.py::test_getitem_arrays_and_ints_2[1]
14-
array_api_tests/test_array_object.py::test_getitem_arrays_and_ints_2[None]

.github/workflows/build-sphinx.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
oneapi-pkgs-env: ''
4343
# Enable env when it's required to use only conda packages without OneAPI installation
4444
# oneapi-pkgs-env: '${{ github.workspace }}/environments/oneapi_pkgs.yml'
45+
dpctl-pkg-txt: 'environments/dpctl_pkg.txt'
4546

4647
steps:
4748
- name: Cancel Previous Runs
@@ -149,7 +150,7 @@ jobs:
149150
- name: Install dpctl
150151
if: env.oneapi-pkgs-env == ''
151152
run: |
152-
pip install -i https://pypi.anaconda.org/dppy/label/dev/simple dpctl==0.20.0dev0
153+
pip install -r ${{ env.dpctl-pkg-txt }}
153154
154155
- name: Conda info
155156
run: |

.github/workflows/conda-package.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ jobs:
8282
environment-file: ${{ env.build-conda-pkg-env }}
8383
activate-environment: ${{ env.build-env-name }}
8484

85+
- name: List installed packages
86+
run: mamba list
87+
8588
- name: Store conda paths as envs
8689
shell: bash -el {0}
8790
run: |

.github/workflows/generate_coverage.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
oneapi-pkgs-env: ''
2727
# Enable env when it's required to use only conda packages without OneAPI installation
2828
# oneapi-pkgs-env: '${{ github.workspace }}/environments/oneapi_pkgs.yml'
29+
dpctl-pkg-txt: 'environments/dpctl_pkg.txt'
2930

3031
steps:
3132
- name: Cancel Previous Runs
@@ -108,7 +109,7 @@ jobs:
108109
- name: Install dpctl
109110
if: env.oneapi-pkgs-env == ''
110111
run: |
111-
pip install -i https://pypi.anaconda.org/dppy/label/dev/simple dpctl==0.20.0dev0
112+
pip install -r ${{ env.dpctl-pkg-txt }}
112113
113114
- name: Conda info
114115
run: |

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222
* The vector norms `ord={None, 1, 2, inf}` and the matrix norms `ord={None, 1, 2, inf, "fro", "nuc"}` now consistently return zero for empty arrays, which are arrays with at least one axis of size zero. This change affects `dpnp.linalg.norm`, `dpnp.linalg.vector_norm`, and `dpnp.linalg.matrix_norm`. Previously, dpnp would either raise errors or return zero depending on the parameters provided [#2371](https://github.com/IntelPython/dpnp/pull/2371)
2323
* Extended `dpnp.fft.fftfreq` and `dpnp.fft.rfftfreq` functions to support `dtype` keyword per Python Array API spec 2024.12 [#2384](https://github.com/IntelPython/dpnp/pull/2384)
2424
* Updated `dpnp.fix` to return output with the same data-type of input [#2392](https://github.com/IntelPython/dpnp/pull/2392)
25+
* Updated `dpnp.einsum` to add support for `order=None` [#2411](https://github.com/IntelPython/dpnp/pull/2411)
2526

2627
### Fixed
2728

conda-recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% set max_compiler_and_mkl_version = environ.get("MAX_BUILD_CMPL_MKL_VERSION", "2026.0a0") %}
22
{% set required_compiler_and_mkl_version = "2025.0" %}
3-
{% set required_dpctl_version = "0.19.0*" %}
3+
{% set required_dpctl_version = "0.20.0*" %}
44

55
package:
66
name: dpnp

dpnp/dpnp_iface_linearalgebra.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,13 @@ def einsum(
215215
If provided, forces the calculation to use the data type specified.
216216
217217
Default: ``None``.
218-
order : {"C", "F", "A", "K"}, optional
218+
order : {None, "C", "F", "A", "K"}, optional
219219
Controls the memory layout of the output. ``"C"`` means it should be
220220
C-contiguous. ``"F"`` means it should be F-contiguous, ``"A"`` means
221221
it should be ``"F"`` if the inputs are all ``"F"``, ``"C"`` otherwise.
222222
``"K"`` means it should be as close to the layout as the inputs as
223-
is possible, including arbitrarily permuted axes.
223+
is possible, including arbitrarily permuted axes. ``order=None`` is
224+
equivalent to ``order="K"``.
224225
225226
Default: ``"K"``.
226227
casting : {"no", "equiv", "safe", "same_kind", "unsafe"}, optional

dpnp/dpnp_iface_mathematical.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ def around(x, /, decimals=0, out=None):
612612
Parameters
613613
----------
614614
x : {dpnp.ndarray, usm_ndarray}
615-
Input array, expected to have a real-valued data type.
615+
Input array, expected to have a boolean or real-valued data type.
616616
out : {None, dpnp.ndarray, usm_ndarray}, optional
617617
Output array to populate.
618618
Array must have the correct shape and the expected data type.
@@ -792,6 +792,7 @@ def clip(a, /, min=None, max=None, *, out=None, order="K", **kwargs):
792792

793793
conj = conjugate
794794

795+
795796
_COPYSIGN_DOCSTRING = """
796797
Composes a floating-point value with the magnitude of `x1_i` and the sign of
797798
`x2_i` for each element of input arrays `x1` and `x2`.
@@ -1718,7 +1719,7 @@ def ediff1d(ary, to_end=None, to_begin=None):
17181719
Parameters
17191720
----------
17201721
x : {dpnp.ndarray, usm_ndarray}
1721-
Input array, expected to have a real-valued data type.
1722+
Input array, expected to have a boolean or real-valued data type.
17221723
out : {None, dpnp.ndarray, usm_ndarray}, optional
17231724
Output array to populate.
17241725
Array must have the correct shape and the expected data type.
@@ -1879,7 +1880,7 @@ def ediff1d(ary, to_end=None, to_begin=None):
18791880
Parameters
18801881
----------
18811882
x : {dpnp.ndarray, usm_ndarray}
1882-
Input array, expected to have a real-valued data type.
1883+
Input array, expected to have a boolean or real-valued data type.
18831884
out : {None, dpnp.ndarray, usm_ndarray}, optional
18841885
Output array to populate.
18851886
Array must have the correct shape and the expected data type.
@@ -4731,7 +4732,7 @@ def trapezoid(y, x=None, dx=1.0, axis=-1):
47314732
Parameters
47324733
----------
47334734
x : {dpnp.ndarray, usm_ndarray}
4734-
Input array, expected to have a real-valued data type.
4735+
Input array, expected to have a boolean or real-valued data type.
47354736
out : {None, dpnp.ndarray, usm_ndarray}, optional
47364737
Output array to populate.
47374738
Array must have the correct shape and the expected data type.

dpnp/dpnp_utils/dpnp_utils_einsum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ def dpnp_einsum(
10341034
)
10351035
arrays.append(operands[id])
10361036
result_dtype = dpnp.result_type(*arrays) if dtype is None else dtype
1037-
if order in "aA":
1037+
if order is not None and order in "aA":
10381038
order = "F" if all(arr.flags.fnc for arr in arrays) else "C"
10391039

10401040
input_subscripts = [

dpnp/tests/test_linalg.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,10 @@ def test_output_order(self):
16471647
assert tmp.flags.c_contiguous is False
16481648
assert tmp.flags.f_contiguous is False
16491649

1650+
tmp = dpnp.einsum("...ft,mf->...mt", a, b, order=None, optimize=opt)
1651+
assert tmp.flags.c_contiguous is False
1652+
assert tmp.flags.f_contiguous is False
1653+
16501654
tmp = dpnp.einsum("...ft,mf->...mt", a, b, optimize=opt)
16511655
assert tmp.flags.c_contiguous is False
16521656
assert tmp.flags.f_contiguous is False

0 commit comments

Comments
 (0)