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()
Source§impl From<StridedError> for EinsumError
impl From<StridedError> for EinsumError
Source§fn from(source: StridedError) -> EinsumError
fn from(source: StridedError) -> EinsumError
Converts to this type from the input type.
Source§impl From<StridedError> for EinsumError
impl From<StridedError> for EinsumError
Source§fn from(source: StridedError) -> EinsumError
fn from(source: StridedError) -> EinsumError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StridedError
impl RefUnwindSafe for StridedError
impl Send for StridedError
impl Sync for StridedError
impl Unpin for StridedError
impl UnsafeUnpin 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
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more