We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8dde517 commit 2f0a09dCopy full SHA for 2f0a09d
src/numeric/impl_numeric.rs
@@ -137,13 +137,13 @@ where
137
}
138
139
let mut res = Array::ones(self.raw_dim());
140
- let mut acc = Array::ones(self.raw_dim().remove_axis(axis));
+ let mut running_product = Array::ones(self.raw_dim().remove_axis(axis));
141
142
Zip::from(self.axis_iter(axis))
143
.and(res.axis_iter_mut(axis))
144
.for_each(|view, mut res| {
145
- acc = acc.clone() * &view;
146
- res.assign(&acc);
+ running_product = &running_product * &view;
+ res.assign(&running_product);
147
});
148
149
res
0 commit comments