@@ -164,7 +164,7 @@ fn test_with_array_of_floats() {
164
164
epsilon = 1e-12
165
165
) ;
166
166
167
- let data = a. into_shape ( ( 2 , 5 , 5 ) ) . unwrap ( ) ;
167
+ let data = a. into_shape_with_order ( ( 2 , 5 , 5 ) ) . unwrap ( ) ;
168
168
let weights = array ! [ 0.1 , 0.5 , 0.25 , 0.15 , 0.2 ] ;
169
169
assert_abs_diff_eq ! (
170
170
data. weighted_mean_axis( Axis ( 1 ) , & weights) . unwrap( ) ,
@@ -254,7 +254,9 @@ fn mean_axis_eq_if_uniform_weights() {
254
254
let depth = a. len ( ) / 12 ;
255
255
a. truncate ( depth * 3 * 4 ) ;
256
256
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 ( ) ;
258
260
let ma = a. mean_axis ( Axis ( 0 ) ) . unwrap ( ) ;
259
261
let wm = a. weighted_mean_axis ( Axis ( 0 ) , & weights) . unwrap ( ) ;
260
262
let ws = a. weighted_sum_axis ( Axis ( 0 ) , & weights) . unwrap ( ) ;
@@ -288,7 +290,9 @@ fn weighted_var_algo_eq_simple_algo() {
288
290
}
289
291
let depth = a. len ( ) / 12 ;
290
292
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 ( ) ;
292
296
let mut success = true ;
293
297
for axis in 0 ..3 {
294
298
let axis = Axis ( axis) ;
0 commit comments