Skip to content

Commit 0117546

Browse files
committed
Use std::equal in loop over all choice arrays
1 parent 520e3d1 commit 0117546

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dpnp/backend/extensions/indexing/choose.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,8 @@ std::pair<sycl::event, sycl::event>
256256
}
257257

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

0 commit comments

Comments
 (0)