Skip to content

Commit e9aaf2f

Browse files
authored
Merge branch 'master' into update-python-ver-in-docs
2 parents 2dee517 + a804dd7 commit e9aaf2f

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ This release achieves 100% compliance with Python Array API specification (revis
3131
* Changed `"max dimensions"` to `None` in array API capabilities [#2432](https://github.com/IntelPython/dpnp/pull/2432)
3232
* Updated kernel header `i0.hpp` to expose `cyl_bessel_i0` function depending on build target [#2440](https://github.com/IntelPython/dpnp/pull/2440)
3333
* Added MKL functions `arg`, `copysign`, `i0`, and `inv` from VM namespace to be used by implementation of the appropriate element-wise functions [#2445](https://github.com/IntelPython/dpnp/pull/2445)
34+
* Clarified details about conda install instructions in `Quick start quide` and `README` [#2446](https://github.com/IntelPython/dpnp/pull/2446)
35+
* Bumped oneMKL version up to `0.7` [#2448](https://github.com/IntelPython/dpnp/pull/2448)
36+
* The parameter `axis` in `dpnp.take_along_axis` function has now a default value of `-1` [#2442](https://github.com/IntelPython/dpnp/pull/2442)
3437
* Updates the list of required python versions documented in `Quick Start Guide` [#2449](https://github.com/IntelPython/dpnp/pull/2449)
3538

3639
### Fixed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,16 @@ if(_use_onemkl_interfaces)
117117
endif()
118118

119119
if(DPNP_ONEMKL_INTERFACES_DIR)
120-
FetchContent_Declare(onemkl_interfaces_library SOURCE_DIR "${DPNP_ONEMKL_INTERFACES_DIR}")
120+
FetchContent_Declare(onemath_library SOURCE_DIR "${DPNP_ONEMKL_INTERFACES_DIR}")
121121
else()
122122
FetchContent_Declare(
123-
onemkl_interfaces_library
123+
onemath_library
124124
GIT_REPOSITORY https://github.com/uxlfoundation/oneMath.git
125-
GIT_TAG 8f4312ef966420b9b8b4b82b9d5c22e2c91a1fe7 # v0.6
125+
GIT_TAG 20ba6fd7ae4af6ed693246cfd22c343e6522edbe # v0.7
126126
)
127127
endif()
128128

129-
FetchContent_MakeAvailable(onemkl_interfaces_library)
129+
FetchContent_MakeAvailable(onemath_library)
130130
if(TARGET onemath)
131131
set(MKL_INTERFACES_LIB "onemath" CACHE INTERNAL "OneMath lib target")
132132
elseif(TARGET onemkl)

dpnp/dpnp_iface_indexing.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2205,7 +2205,7 @@ def take(a, indices, /, *, axis=None, out=None, mode="wrap"):
22052205
return dpnp.get_result_array(usm_res, out=out)
22062206

22072207

2208-
def take_along_axis(a, indices, axis, mode="wrap"):
2208+
def take_along_axis(a, indices, axis=-1, mode="wrap"):
22092209
"""
22102210
Take values from the input array by matching 1d index and data slices.
22112211
@@ -2227,9 +2227,12 @@ def take_along_axis(a, indices, axis, mode="wrap"):
22272227
dimension of the input array, but dimensions ``Ni`` and ``Nj``
22282228
only need to broadcast against `a`.
22292229
axis : {None, int}
2230-
The axis to take 1d slices along. If axis is ``None``, the input
2231-
array is treated as if it had first been flattened to 1d,
2232-
for consistency with :obj:`dpnp.sort` and :obj:`dpnp.argsort`.
2230+
The axis to take 1d slices along. If axis is ``None``, the input array
2231+
is treated as if it had first been flattened to 1d. The default is
2232+
``-1``, which takes 1d slices along the last axis. These behaviors are
2233+
consistent with :obj:`dpnp.sort` and :obj:`dpnp.argsort`.
2234+
2235+
Default: ``-1``.
22332236
mode : {"wrap", "clip"}, optional
22342237
Specifies how out-of-bounds indices will be handled. Possible values
22352238
are:
@@ -2274,8 +2277,8 @@ def take_along_axis(a, indices, axis, mode="wrap"):
22742277
array([[10, 20, 30],
22752278
[40, 50, 60]])
22762279
2277-
The same works for max and min, if you maintain the trivial dimension
2278-
with ``keepdims``:
2280+
The same works for :obj:`dpnp.max` and :obj:`dpnp.min`, if you maintain
2281+
the trivial dimension with ``keepdims``:
22792282
22802283
>>> np.max(a, axis=1, keepdims=True)
22812284
array([[30],

dpnp/tests/test_indexing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ def test_argequivalent(self, func, argfunc, kwargs):
804804
# a = dpnp.random.random(size=(3, 4, 5))
805805
a = dpnp.asarray(numpy.random.random(size=(3, 4, 5)))
806806

807-
for axis in list(range(a.ndim)) + [None]:
807+
for axis in list(range(a.ndim)) + [None, -1]:
808808
a_func = func(a, axis=axis, **kwargs)
809809
ai_func = argfunc(a, axis=axis, **kwargs)
810810
assert_array_equal(

0 commit comments

Comments
 (0)