Skip to content

Commit

Permalink
Use std::equal in loop over all choice arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
ndgrigorian committed Dec 9, 2024
1 parent c2b4c5e commit 6b96da3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dpnp/backend/extensions/indexing/choose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,8 @@ std::pair<sycl::event, sycl::event>
}

const py::ssize_t *chc_shape_ = chc_.get_shape_raw();
for (int dim = 0; dim < nd; ++dim) {
if (!(chc_shape[dim] == chc_shape_[dim])) {
throw py::value_error("Choice shapes are not all equal.");
}
if (!std::equal(chc_shape_, chc_shape_ + nd, chc_shape)) {
throw py::value_error("Choice shapes are not all equal.");
}
}

Expand Down

0 comments on commit 6b96da3

Please sign in to comment.