#[non_exhaustive]pub enum MattenNdarrayError {
DynamicTensor,
ZeroSizedAxis(Vec<usize>),
NdarrayShape(ShapeError),
Matten(MattenError),
}Expand description
Errors produced by the matten ↔ ndarray conversions.
#[non_exhaustive] so future variants are not a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DynamicTensor
A dynamic (Element) tensor was passed to a conversion. Convert it to a
numeric tensor first with Tensor::try_numeric().
ZeroSizedAxis(Vec<usize>)
from_arrayd accepts a zero-length axis since RFC-111; this variant is never constructed
Formerly returned when the input ndarray shape contained a
zero-length axis. Core matten now accepts zero-sized dimensions
(RFC-111), so from_arrayd no longer rejects one — this variant is
never constructed. Kept, rather than removed, because the enum is
#[non_exhaustive] but a removed variant still breaks anyone
matching on it.
NdarrayShape(ShapeError)
ndarray could not construct the target array (e.g. a shape/length
mismatch).
Matten(MattenError)
Core matten rejected the conversion (e.g. the rank exceeds MAX_NDIM).
Trait Implementations§
Source§impl Debug for MattenNdarrayError
impl Debug for MattenNdarrayError
Source§impl Display for MattenNdarrayError
impl Display for MattenNdarrayError
Source§impl Error for MattenNdarrayError
impl Error for MattenNdarrayError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()