pub enum TensorOpsError {
DimOutOfBounds(usize, usize),
LengthMismatch(usize, usize),
ShapeMismatch(Vec<usize>, Vec<usize>),
TensorError(TensorError),
}Expand description
An error type for tensor operations.
Variants§
DimOutOfBounds(usize, usize)
The dimension to perform the operation over is greater than the number of dimsions of the tensor.
LengthMismatch(usize, usize)
Length mismatch for vector operations
ShapeMismatch(Vec<usize>, Vec<usize>)
Shape mismatch
TensorError(TensorError)
Tensor error
Trait Implementations§
Source§impl Debug for TensorOpsError
impl Debug for TensorOpsError
Source§impl Display for TensorOpsError
impl Display for TensorOpsError
Source§impl Error for TensorOpsError
impl Error for TensorOpsError
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<TensorError> for TensorOpsError
impl From<TensorError> for TensorOpsError
Source§fn from(source: TensorError) -> Self
fn from(source: TensorError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TensorOpsError
impl PartialEq for TensorOpsError
impl StructuralPartialEq for TensorOpsError
Auto Trait Implementations§
impl Freeze for TensorOpsError
impl RefUnwindSafe for TensorOpsError
impl Send for TensorOpsError
impl Sync for TensorOpsError
impl Unpin for TensorOpsError
impl UnwindSafe for TensorOpsError
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