Commit 5d612a82 authored by wsttiger's avatar wsttiger
Browse files

Added copy_if for Paul

parent d0c3a01d
...@@ -375,11 +375,10 @@ struct squeeze ...@@ -375,11 +375,10 @@ struct squeeze
std::vector<std::size_t> new_lens; std::vector<std::size_t> new_lens;
if(axes.empty()) if(axes.empty())
{ {
for (unsigned long len : old_lens) std::copy_if(old_lens.begin(),
{ old_lens.end(),
if(len != 1) std::back_inserter(new_lens),
new_lens.push_back(len); [](auto len) { return len != 1; });
}
} }
else else
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment