pub enum ReadNpyError {
Io(Error),
ParseHeader(ParseHeaderError),
ParseData(Box<dyn Error + Send + Sync + 'static>),
LengthOverflow,
WrongNdim(Option<usize>, usize),
WrongDescriptor(Value),
MissingData,
ExtraBytes(usize),
}
Expand description
An error reading a .npy
file.
Variants§
Io(Error)
An error caused by I/O.
ParseHeader(ParseHeaderError)
An error parsing the file header.
ParseData(Box<dyn Error + Send + Sync + 'static>)
An error parsing the data.
LengthOverflow
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.
WrongNdim(Option<usize>, usize)
An error caused by incorrect Dimension
type.
WrongDescriptor(Value)
The type descriptor does not match the element type.
MissingData
The 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.
Trait Implementations§
Source§impl Debug for ReadNpyError
impl Debug for ReadNpyError
Source§impl Display for ReadNpyError
impl Display for ReadNpyError
Source§impl Error for ReadNpyError
impl Error for ReadNpyError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for ReadNpyError
impl From<Error> for ReadNpyError
Source§fn from(err: Error) -> ReadNpyError
fn from(err: Error) -> ReadNpyError
Converts to this type from the input type.
Source§impl From<ReadDataError> for ReadNpyError
impl From<ReadDataError> for ReadNpyError
Source§fn from(err: ReadDataError) -> ReadNpyError
fn from(err: ReadDataError) -> ReadNpyError
Converts to this type from the input type.
Source§impl From<ReadNpyError> for ReadNpzError
impl From<ReadNpyError> for ReadNpzError
Source§fn from(err: ReadNpyError) -> ReadNpzError
fn from(err: ReadNpyError) -> ReadNpzError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ReadNpyError
impl !RefUnwindSafe for ReadNpyError
impl Send for ReadNpyError
impl Sync for ReadNpyError
impl Unpin for ReadNpyError
impl !UnwindSafe for ReadNpyError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more