is_matrix_square

compas.geometry.is_matrix_square(M)[source]

Verify that a matrix is square.

Parameters:
Mlist[list[float]]

The matrix.

Returns:
bool

True if the length of every row is equal to the number of rows. False otherwise.

See also

is_matrix_symmetric

Examples

>>> M = identity_matrix(4)
>>> is_matrix_square(M)
True