We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2aec819 commit 21fb817Copy full SHA for 21fb817
tests/windows.rs
@@ -278,6 +278,22 @@ fn test_axis_windows_3d()
278
]);
279
}
280
281
+#[test]
282
+fn tests_axis_windows_3d_zips_with_1d()
283
+{
284
+ let a = Array::from_iter(0..27)
285
+ .into_shape_with_order((3, 3, 3))
286
+ .unwrap();
287
+ let mut b = Array::zeros(2);
288
+
289
+ Zip::from(b.view_mut())
290
+ .and(a.axis_windows(Axis(1), 2))
291
+ .for_each(|b, a| {
292
+ *b = a.sum();
293
+ });
294
+ assert_eq!(b,arr1(&[207, 261]));
295
+}
296
297
#[test]
298
fn test_window_neg_stride()
299
{
0 commit comments