Skip to content

Commit d1dbe73

Browse files
committed
Update for deprecated into_shape
1 parent 5a20985 commit d1dbe73

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/summary_statistics.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)