use ndarray_linalg::error::LinalgError;
use thiserror::Error;
pub type Result<T> = std::result::Result<T, FastIcaError>;
#[derive(Error, Debug)]
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),
#[error("Linalg Error: {0}")]
Linalg(#[from] LinalgError),
#[error(transparent)]
LinfaError(#[from] linfa::error::Error),
}