pfultz2 opened this issue 7 years ago · 1 comments
This can use std::accumulate when using a RandomAccess range:
std::accumulate
for(auto&& x : v) { if (i != axis) y *= x; i++; }
And also this:
for (auto&& x : v) { if (i > axis) y1 *= x; if (i != axis) y1 *= x; i++; }