1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use thiserror::Error;
pub type Result<T> = std::result::Result<T, FastIcaError>;
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum FastIcaError {
#[error("Dataset must contain at least one sample")]
NotEnoughSamples,
#[error("Invalid value encountered: {0}")]
InvalidValue(String),
#[error("SVD Decomposition failed, X could be an Ill-Conditioned matrix")]
SvdDecomposition,
#[error("tolerance should be positive but is {0}")]
InvalidTolerance(f32),
#[cfg(feature = "blas")]
#[error("Linalg BLAS error: {0}")]
LinalgBlasError(#[from] ndarray_linalg::error::LinalgError),
#[error("Linalg error: {0}")]
LinalgError(#[from] linfa_linalg::LinalgError),
#[error(transparent)]
LinfaError(#[from] linfa::error::Error),
}