kornia_tensor_ops/
error.rs1use kornia_tensor::TensorError;
2use thiserror::Error;
3
4#[derive(Error, Debug, PartialEq)]
6pub enum TensorOpsError {
7 #[error("Dimension out of bounds. The dimension {0} is out of bounds ({1}).")]
9 DimOutOfBounds(usize, usize),
10
11 #[error("Length mismatch: expected equal length vectors, got {0} and {1}")]
13 LengthMismatch(usize, usize),
14
15 #[error("Shape mismatch: {0:?} != {1:?}")]
17 ShapeMismatch(Vec<usize>, Vec<usize>),
18
19 #[error("Error with the tensor: {0}")]
21 TensorError(#[from] TensorError),
22}