pub enum RandomProjectionCodecError {
UnsupportedDtype(AnyArrayDType),
NonMatrixData {
source: ShapeError,
},
NonFiniteData,
NumberOfSamplesMismatch {
input: usize,
output: usize,
},
ProjectedArrayZeroComponents,
CorruptedNumberOfComponents,
NumberOfFeaturesMismatch {
metadata: usize,
output: usize,
},
MismatchedDecodeIntoArray {
source: AnyArrayAssignError,
},
}Expand description
Errors that may occur when applying the RandomProjectionCodec.
Variants§
UnsupportedDtype(AnyArrayDType)
RandomProjectionCodec does not support the dtype
NonMatrixData
RandomProjectionCodec only supports matrix / 2d-shaped arrays
Fields
source: ShapeErrorThe source of the error
NonFiniteData
RandomProjectionCodec does not support non-finite (infinite or NaN)
floating point data
NumberOfSamplesMismatch
RandomProjectionCodec cannot encode or decode from an array with
$N$ samples to an array with a different number of samples
Fields
ProjectedArrayZeroComponents
RandomProjectionCodec cannot decode from an array with zero
dimensionality $K$
CorruptedNumberOfComponents
RandomProjectionCodec cannot decode from an array with corrupted
dimensionality metadata
NumberOfFeaturesMismatch
RandomProjectionCodec cannot decode into an array with $D$
features that differs from the $D$ stored in the encoded metadata
Fields
MismatchedDecodeIntoArray
RandomProjectionCodec cannot decode into the provided array
Fields
source: AnyArrayAssignErrorThe source of the error
Trait Implementations§
Source§impl Debug for RandomProjectionCodecError
impl Debug for RandomProjectionCodecError
Source§impl Display for RandomProjectionCodecError
impl Display for RandomProjectionCodecError
Source§impl Error for RandomProjectionCodecError
impl Error for RandomProjectionCodecError
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()