Enum ndarray_npy::ReadNpyError [−][src]
pub enum ReadNpyError {
Io(Error),
ParseHeader(ParseHeaderError),
ParseData(Box<dyn Error + Send + Sync + 'static>),
LengthOverflow,
WrongNdim(Option<usize>, usize),
WrongDescriptor(PyValue),
MissingData,
ExtraBytes(usize),
}Expand description
An error reading a .npy file.
Variants
Io(Error)An error caused by I/O.
Tuple Fields of Io
0: ErrorAn error parsing the file header.
An error parsing the data.
Overflow while computing the length of the array (in units of bytes or the number of elements) from the shape described in the file header.
An error caused by incorrect Dimension type.
WrongDescriptor(PyValue)The type descriptor does not match the element type.
Tuple Fields of WrongDescriptor
0: PyValueThe file does not contain all the data described in the header.
ExtraBytes(usize)Extra bytes are present between the end of the data and the end of the file.
Tuple Fields of ExtraBytes
0: usizeTrait Implementations
Performs the conversion.
Performs the conversion.
Performs the conversion.