colour.algebra.is_identity#
- colour.algebra.is_identity(a: ArrayLike) bool [source]#
Return whether \(a\) array is an identity matrix.
- Parameters
a (ArrayLike) – Array \(a\) to test.
- Returns
Whether \(a\) array is an identity matrix.
- Return type
Examples
>>> is_identity(np.array([1, 0, 0, 0, 1, 0, 0, 0, 1]).reshape(3, 3)) True >>> is_identity(np.array([1, 2, 0, 0, 1, 0, 0, 0, 1]).reshape(3, 3)) False