@@ -164,7 +164,7 @@ fn test_with_array_of_floats() {
164164 epsilon = 1e-12
165165 ) ;
166166
167- let data = a. into_shape ( ( 2 , 5 , 5 ) ) . unwrap ( ) ;
167+ let data = a. into_shape_with_order ( ( 2 , 5 , 5 ) ) . unwrap ( ) ;
168168 let weights = array ! [ 0.1 , 0.5 , 0.25 , 0.15 , 0.2 ] ;
169169 assert_abs_diff_eq ! (
170170 data. weighted_mean_axis( Axis ( 1 ) , & weights) . unwrap( ) ,
@@ -254,7 +254,9 @@ fn mean_axis_eq_if_uniform_weights() {
254254 let depth = a. len ( ) / 12 ;
255255 a. truncate ( depth * 3 * 4 ) ;
256256 let weights = Array1 :: from_elem ( depth, 1.0 / depth as f64 ) ;
257- let a = Array1 :: from ( a) . into_shape ( ( depth, 3 , 4 ) ) . unwrap ( ) ;
257+ let a = Array1 :: from ( a)
258+ . into_shape_with_order ( ( depth, 3 , 4 ) )
259+ . unwrap ( ) ;
258260 let ma = a. mean_axis ( Axis ( 0 ) ) . unwrap ( ) ;
259261 let wm = a. weighted_mean_axis ( Axis ( 0 ) , & weights) . unwrap ( ) ;
260262 let ws = a. weighted_sum_axis ( Axis ( 0 ) , & weights) . unwrap ( ) ;
@@ -288,7 +290,9 @@ fn weighted_var_algo_eq_simple_algo() {
288290 }
289291 let depth = a. len ( ) / 12 ;
290292 a. truncate ( depth * 3 * 4 ) ;
291- let a = Array1 :: from ( a) . into_shape ( ( depth, 3 , 4 ) ) . unwrap ( ) ;
293+ let a = Array1 :: from ( a)
294+ . into_shape_with_order ( ( depth, 3 , 4 ) )
295+ . unwrap ( ) ;
292296 let mut success = true ;
293297 for axis in 0 ..3 {
294298 let axis = Axis ( axis) ;
0 commit comments