pub enum StridedError {
RankMismatch(usize, usize),
ShapeMismatch(Vec<usize>, Vec<usize>),
InvalidAxis {
axis: usize,
rank: usize,
},
StrideLengthMismatch,
OffsetOverflow,
ScalarConversion,
NonSquare {
rows: usize,
cols: usize,
},
}Expand description
Errors that can occur during strided array operations.
Variants§
RankMismatch(usize, usize)
Array ranks do not match.
ShapeMismatch(Vec<usize>, Vec<usize>)
Array shapes are incompatible for the operation.
InvalidAxis
Invalid axis index for the given array rank.
StrideLengthMismatch
Stride array length doesn’t match dimensions.
OffsetOverflow
Integer overflow while computing array offset.
ScalarConversion
Failed to convert a scalar value for scaling operation.
NonSquare
Matrix is not square when a square matrix was required.
Trait Implementations§
Source§impl Debug for StridedError
impl Debug for StridedError
Source§impl Display for StridedError
impl Display for StridedError
Source§impl Error for StridedError
impl Error for StridedError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for StridedError
impl RefUnwindSafe for StridedError
impl Send for StridedError
impl Sync for StridedError
impl Unpin for StridedError
impl UnwindSafe for StridedError
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