The docs don't mention this as a hazard, so I figure it's a bug: https://docs.rs/ndarray/latest/ndarray/struct.ArrayRef.html#method.triu
use ndarray::{Array2, Axis};
fn main() {
let a: Array2<f64> = Array2::from_shape_fn((3, 4), |(i, j)| (i * 4 + j) as f64);
let ft = a.t();
let widened = ft.insert_axis(Axis(2));
widened.triu(0);
}
Found using a fuzzer.
The docs don't mention this as a hazard, so I figure it's a bug: https://docs.rs/ndarray/latest/ndarray/struct.ArrayRef.html#method.triu
Found using a fuzzer.