-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Hello!
Got a problem with trying to convert from a matfile array to an nd Array
My code:
use std::convert::TryInto;
fn main() {
let file = matfile::MatFile::parse(std::fs::File::open("hrir_mp_4096.mat").unwrap()).unwrap();
let arr = file.find_by_name("hrir_mp_4096").unwrap();
let hrir_mp: ndarray::Array2<f32> = arr.try_into().unwrap();
}
I get this error:
the trait 'From<&Array>' is not implemented for 'ArrayBase<OwnedRepr<f32>, Dim<[usize; 2]>>', which is required by 'ArrayBase<OwnedRepr<f32>, Dim<[usize; 2]>>: TryFrom<&Array>'
I have absolutely no idea where the 'From<&Array>' is coming from. Why does it wrap arr into From?
Help would be appreciated!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels