Skip to main content

check_not_empty

Function check_not_empty 

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

Checks if an array is not empty

§Arguments

  • array - The array to check
  • name - The name of the array being checked

§Returns

  • Ok(()) if the array is not empty
  • Err(CoreError::ValueError) if the array is empty