Skip to content

Commit 4dda559

Browse files
committed
Update subview calls to use index_axis
The `.subview()` method is deprecated in the latest `ndarray`.
1 parent 882a411 commit 4dda559

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/quantile.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fn test_max_skipnan_all_nan() {
6666
fn test_quantile_axis_mut_with_odd_axis_length() {
6767
let mut a = arr2(&[[1, 3, 2, 10], [2, 4, 3, 11], [3, 5, 6, 12]]);
6868
let p = a.quantile_axis_mut::<Lower>(Axis(0), 0.5);
69-
assert!(p == a.subview(Axis(0), 1));
69+
assert!(p == a.index_axis(Axis(0), 1));
7070
}
7171

7272
#[test]
@@ -87,7 +87,7 @@ fn test_quantile_axis_mut_with_empty_array() {
8787
fn test_quantile_axis_mut_with_even_axis_length() {
8888
let mut b = arr2(&[[1, 3, 2, 10], [2, 4, 3, 11], [3, 5, 6, 12], [4, 6, 7, 13]]);
8989
let q = b.quantile_axis_mut::<Lower>(Axis(0), 0.5);
90-
assert!(q == b.subview(Axis(0), 1));
90+
assert!(q == b.index_axis(Axis(0), 1));
9191
}
9292

9393
#[test]

0 commit comments

Comments
 (0)