check_min_samples

Function check_min_samples 

Source
pub fn check_min_samples<S, D, A>(
    array: &ArrayBase<S, D>,
    min_samples: usize,
    name: A,
) -> CoreResult<()>
where S: Data, D: Dimension, A: Into<String>,
Expand description

Checks if an array has at least the minimum number of samples

§Arguments

  • array - The array to check
  • min_samples - The minimum required number of samples
  • name - The name of the array being checked

§Returns

  • Ok(()) if the array has sufficient samples
  • Err(CoreError::ValueError) if the array has too few samples