Skip to content

Commit 1b00771

Browse files
committed
refactored unit stride logic
1 parent c357f0d commit 1b00771

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/iterators/windows.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,8 @@ impl<'a, A, D: Dimension> Windows<'a, A, D> {
2323
let ndim = window.ndim();
2424

2525
let mut unit_stride = D::zeros(ndim);
26-
let stride_slice = unit_stride.slice_mut();
27-
for s in stride_slice.iter_mut() {
28-
*s = 1;
29-
}
30-
26+
unit_stride.slice_mut().fill(1);
27+
3128
Windows::new_with_stride(a, window, unit_stride)
3229
}
3330

0 commit comments

Comments
 (0)