#[non_exhaustive]pub enum EinsumError {
Show 13 variants
InvalidCharacter {
position: usize,
byte: u8,
},
MalformedSubscripts {
position: usize,
reason: &'static str,
},
OperandCountMismatch {
subscripts: usize,
operands: usize,
},
TooManyLabels {
operand: usize,
labels: usize,
ndim: usize,
},
TooFewLabels {
operand: usize,
labels: usize,
ndim: usize,
},
DiagonalSizeMismatch {
operand: usize,
label: char,
sizes: (usize, usize),
},
BroadcastMismatch {
label: Option<char>,
sizes: (usize, usize),
},
OutputLabelRepeated {
label: char,
},
OutputLabelUnknown {
label: char,
},
OutputEllipsisMissing {
broadcast_rank: usize,
},
SizeOverflow,
ShapeMismatch {
operand: usize,
expected: Vec<usize>,
actual: Vec<usize>,
},
InvalidPath {
reason: &'static str,
},
}Expand description
Reports invalid expressions, shapes, and paths.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidCharacter
A byte outside the subscript grammar was found.
MalformedSubscripts
An arrow or another grammar element is malformed.
Fields
OperandCountMismatch
The number of input groups differs from the operand count.
TooManyLabels
An operand group names more axes than the operand has.
Fields
TooFewLabels
An operand without an ellipsis names fewer axes than its rank.
Fields
DiagonalSizeMismatch
Repeated axes in one operand have different lengths.
Fields
BroadcastMismatch
Two axes cannot broadcast to one label size.
Fields
OutputLabelRepeated
An explicit output repeats a label.
OutputLabelUnknown
An explicit output names a label absent from every input.
OutputEllipsisMissing
An explicit output omits broadcast axes.
SizeOverflow
A required array size does not fit in usize.
ShapeMismatch
Execution operands differ from the shapes bound to a plan.
Fields
InvalidPath
A supplied path cannot reduce the operand list to one value.
Trait Implementations§
Source§impl Clone for EinsumError
impl Clone for EinsumError
Source§fn clone(&self) -> EinsumError
fn clone(&self) -> EinsumError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EinsumError
impl Debug for EinsumError
Source§impl Display for EinsumError
impl Display for EinsumError
impl Eq for EinsumError
Source§impl Error for EinsumError
impl Error for EinsumError
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 PartialEq for EinsumError
impl PartialEq for EinsumError
impl StructuralPartialEq for EinsumError
Auto Trait Implementations§
impl Freeze for EinsumError
impl RefUnwindSafe for EinsumError
impl Send for EinsumError
impl Sync for EinsumError
impl Unpin for EinsumError
impl UnsafeUnpin for EinsumError
impl UnwindSafe for EinsumError
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