@@ -100,7 +100,7 @@ fn windows_iterator_3d() {
100100#[ should_panic]
101101fn windows_iterator_stride_axis_zero ( ) {
102102 let a = Array :: from_iter ( 10 ..37 ) . into_shape ( ( 3 , 3 , 3 ) ) . unwrap ( ) ;
103- a. windows_with_stride ( Dim ( ( 2 , 2 , 2 ) ) , Dim ( ( 0 , 2 , 2 ) ) ) ;
103+ a. windows_with_stride ( ( 2 , 2 , 2 ) , ( 0 , 2 , 2 ) ) ;
104104}
105105
106106/// Test that verifies that only first window is yielded when stride is oversized on every axis.
@@ -110,7 +110,7 @@ fn windows_iterator_only_one_valid_window_for_oversized_stride() {
110110 let mut iter = a. windows_with_stride ( ( 2 , 2 , 2 ) , ( 8 , 8 , 8 ) ) . into_iter ( ) ; // (4,3,2) doesn't fit into (3,3,3) => oversized!
111111 itertools:: assert_equal (
112112 iter. next ( ) ,
113- Some ( arr3 ( & [ [ [ 10 , 11 ] , [ 15 , 16 ] ] , [ [ 35 , 36 ] , [ 40 , 41 ] ] ] ) )
113+ Some ( arr3 ( & [ [ [ 10 , 11 ] , [ 15 , 16 ] ] , [ [ 35 , 36 ] , [ 40 , 41 ] ] ] ) ) ,
114114 ) ;
115115}
116116
@@ -119,7 +119,7 @@ fn windows_iterator_only_one_valid_window_for_oversized_stride() {
119119fn windows_iterator_1d_with_stride ( ) {
120120 let a = Array :: from_iter ( 10 ..20 ) . into_shape ( 10 ) . unwrap ( ) ;
121121 itertools:: assert_equal (
122- a. windows_with_stride ( Dim ( 4 ) , Dim ( 2 ) ) ,
122+ a. windows_with_stride ( 4 , 2 ) ,
123123 vec ! [
124124 arr1( & [ 10 , 11 , 12 , 13 ] ) ,
125125 arr1( & [ 12 , 13 , 14 , 15 ] ) ,
@@ -134,7 +134,7 @@ fn windows_iterator_1d_with_stride() {
134134fn windows_iterator_2d_with_stride ( ) {
135135 let a = Array :: from_iter ( 10 ..30 ) . into_shape ( ( 5 , 4 ) ) . unwrap ( ) ;
136136 itertools:: assert_equal (
137- a. windows_with_stride ( Dim ( ( 3 , 2 ) ) , Dim ( ( 2 , 1 ) ) ) ,
137+ a. windows_with_stride ( ( 3 , 2 ) , ( 2 , 1 ) ) ,
138138 vec ! [
139139 arr2( & [ [ 10 , 11 ] , [ 14 , 15 ] , [ 18 , 19 ] ] ) ,
140140 arr2( & [ [ 11 , 12 ] , [ 15 , 16 ] , [ 19 , 20 ] ] ) ,
@@ -151,7 +151,7 @@ fn windows_iterator_2d_with_stride() {
151151fn windows_iterator_3d_with_stride ( ) {
152152 let a = Array :: from_iter ( 10 ..74 ) . into_shape ( ( 4 , 4 , 4 ) ) . unwrap ( ) ;
153153 itertools:: assert_equal (
154- a. windows_with_stride ( Dim ( ( 2 , 2 , 2 ) ) , Dim ( ( 2 , 2 , 2 ) ) ) ,
154+ a. windows_with_stride ( ( 2 , 2 , 2 ) , ( 2 , 2 , 2 ) ) ,
155155 vec ! [
156156 arr3( & [ [ [ 10 , 11 ] , [ 14 , 15 ] ] , [ [ 26 , 27 ] , [ 30 , 31 ] ] ] ) ,
157157 arr3( & [ [ [ 12 , 13 ] , [ 16 , 17 ] ] , [ [ 28 , 29 ] , [ 32 , 33 ] ] ] ) ,
0 commit comments