10000 use std::equal · xtensor-stack/xtensor-python@9a26ec8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9a26ec8

Browse files
committed
use std::equal
1 parent eb5cb76 commit 9a26ec8

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

include/xtensor-python/xtensor_type_caster_base.hpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,7 @@ namespace pybind11
151151
static bool run(const B& buf)
152152
{
153153
auto shape = FSH();
154-
for (std::size_t i = 0; i < shape.size(); ++i)
155-
{
156-
if (shape[i] != buf.shape(i))
157-
{
158-
return false;
159-
}
160-
}
161-
return true;
154+
return std::equal(shape.begin(), shape.end(), buf.shape());
162155
}
163156
};
164157

0 commit comments

Comments
 (0)
0