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

Added copy_if for Paul

parent d0c3a01d
......@@ -375,11 +375,10 @@ struct squeeze
std::vector<std::size_t> new_lens;
if(axes.empty())
{
for (unsigned long len : old_lens)
{
if(len != 1)
new_lens.push_back(len);
}
std::copy_if(old_lens.begin(),
old_lens.end(),
std::back_inserter(new_lens),
[](auto len) { return len != 1; });
}
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