Skip to content

Commit d48c5a9

Browse files
Simplify code using ndim
1 parent 17f86bb commit d48c5a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/arrayformat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn format_array<A, S, D, F>(view: &ArrayBase<S, D>,
3737
.map(|(axis, _)| axis)
3838
.collect();
3939

40-
let ndim = view.dim().into_dimension().slice().len();
40+
let ndim = view.ndim();
4141
let nth_idx_max = view.shape().iter().last().unwrap();
4242

4343
// None will be an empty iter.

0 commit comments

Comments
 (0)