use anyhow::Result;
use ndarray::Array2;
pub fn into_f_major(mat: &Array2<f32>) -> Result<Array2<f32>> {
let shape = mat.dim();
let vt: Vec<f32> = Vec::from_iter(mat.t().iter().copied());
let f_mat: Array2<f32> = Array2::from_shape_vec(shape, vt).unwrap().t().to_owned();
Ok(f_mat)
}