@@ -100,7 +100,7 @@ fn windows_iterator_3d() {
100
100
#[ should_panic]
101
101
fn windows_iterator_stride_axis_zero ( ) {
102
102
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 ) ) ;
104
104
}
105
105
106
106
/// 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() {
110
110
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!
111
111
itertools:: assert_equal (
112
112
iter. next ( ) ,
113
- Some ( arr3 ( & [ [ [ 10 , 11 ] , [ 15 , 16 ] ] , [ [ 35 , 36 ] , [ 40 , 41 ] ] ] ) )
113
+ Some ( arr3 ( & [ [ [ 10 , 11 ] , [ 15 , 16 ] ] , [ [ 35 , 36 ] , [ 40 , 41 ] ] ] ) ) ,
114
114
) ;
115
115
}
116
116
@@ -119,7 +119,7 @@ fn windows_iterator_only_one_valid_window_for_oversized_stride() {
119
119
fn windows_iterator_1d_with_stride ( ) {
120
120
let a = Array :: from_iter ( 10 ..20 ) . into_shape ( 10 ) . unwrap ( ) ;
121
121
itertools:: assert_equal (
122
- a. windows_with_stride ( Dim ( 4 ) , Dim ( 2 ) ) ,
122
+ a. windows_with_stride ( 4 , 2 ) ,
123
123
vec ! [
124
124
arr1( & [ 10 , 11 , 12 , 13 ] ) ,
125
125
arr1( & [ 12 , 13 , 14 , 15 ] ) ,
@@ -134,7 +134,7 @@ fn windows_iterator_1d_with_stride() {
134
134
fn windows_iterator_2d_with_stride ( ) {
135
135
let a = Array :: from_iter ( 10 ..30 ) . into_shape ( ( 5 , 4 ) ) . unwrap ( ) ;
136
136
itertools:: assert_equal (
137
- a. windows_with_stride ( Dim ( ( 3 , 2 ) ) , Dim ( ( 2 , 1 ) ) ) ,
137
+ a. windows_with_stride ( ( 3 , 2 ) , ( 2 , 1 ) ) ,
138
138
vec ! [
139
139
arr2( & [ [ 10 , 11 ] , [ 14 , 15 ] , [ 18 , 19 ] ] ) ,
140
140
arr2( & [ [ 11 , 12 ] , [ 15 , 16 ] , [ 19 , 20 ] ] ) ,
@@ -151,7 +151,7 @@ fn windows_iterator_2d_with_stride() {
151
151
fn windows_iterator_3d_with_stride ( ) {
152
152
let a = Array :: from_iter ( 10 ..74 ) . into_shape ( ( 4 , 4 , 4 ) ) . unwrap ( ) ;
153
153
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 ) ) ,
155
155
vec ! [
156
156
arr3( & [ [ [ 10 , 11 ] , [ 14 , 15 ] ] , [ [ 26 , 27 ] , [ 30 , 31 ] ] ] ) ,
157
157
arr3( & [ [ [ 12 , 13 ] , [ 16 , 17 ] ] , [ [ 28 , 29 ] , [ 32 , 33 ] ] ] ) ,
0 commit comments