Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ This release is compatible with NumPy 2.5.
* Fixed `dpnp.interp` returning `nan` when querying at an exact knot point whose adjacent `fp` value is `inf` [#2986](https://github.com/IntelPython/dpnp/pull/2986)
* Fixed missing strides validation in `dpnp.tensor.usm_ndarray` constructor when allocating new memory [#2927](https://github.com/IntelPython/dpnp/pull/2927)
* Fixed `dpnp.bincount` raising a `ValueError` on an empty input array instead of returning an empty `intp` array [#3018](https://github.com/IntelPython/dpnp/pull/3018)
* Fixed `dpnp.tensor.top_k` aborting for `k=0` by returning empty result arrays without launching a zero-sized kernel [#3022](https://github.com/IntelPython/dpnp/pull/3022)

### Security

Expand Down
2 changes: 1 addition & 1 deletion dpnp/tensor/libtensor/source/sorting/topk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ std::pair<sycl::event, sycl::event>
dpnp::tensor::validation::CheckWritable::throw_if_not_writable(vals);
dpnp::tensor::validation::CheckWritable::throw_if_not_writable(inds);

if ((iter_nelems == 0) || (axis_nelems == 0)) {
if ((iter_nelems == 0) || (axis_nelems == 0) || (k == 0)) {
// Nothing to do
return std::make_pair(sycl::event(), sycl::event());
}
Expand Down
Loading