check_square

Function check_square 

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

Checks if a matrix is square

§Arguments

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

§Returns

  • Ok(()) if the matrix is square
  • Err(CoreError::ShapeError) if the matrix is not square

§Errors

Returns CoreError::ShapeError if the matrix is not square.