Fix the npy read function and add some testing. (#1080)

This commit is contained in:
Laurent Mazare
2023-10-12 15:25:05 +02:00
committed by GitHub
parent c096f02411
commit 7473c4ceca
5 changed files with 33 additions and 2 deletions

View File

@ -250,8 +250,6 @@ impl Tensor {
if header.fortran_order {
return Err(Error::Npy("fortran order not supported".to_string()));
}
let mut data: Vec<u8> = vec![];
reader.read_to_end(&mut data)?;
Self::from_reader(header.shape(), header.descr, &mut reader)
}