use matten_ndarray::from_arrayd;
use ndarray::{ArrayD, IxDyn};
fn main() {
let arr = ArrayD::from_shape_vec(IxDyn(&[2, 3]), vec![1., 2., 3., 4., 5., 6.]).unwrap();
let t = from_arrayd(arr.clone()).expect("contiguous converts");
println!(
"from contiguous: shape {:?} data {:?}",
t.shape(),
t.as_slice()
);
let tt = from_arrayd(arr.t().to_owned()).expect("transposed converts");
println!(
"from transposed: shape {:?} data {:?}",
tt.shape(),
tt.as_slice()
);
assert_eq!(tt.shape(), &[3, 2]);
assert_eq!(tt.as_slice(), &[1.0, 4.0, 2.0, 5.0, 3.0, 6.0]);
println!("ok");
}