(m)
return np.isclose(eye, np.identity(3), atol=1e-4).all()
Returns true if the 3x3 submatrix represents a rotation.

  Args:
    m: A transformation matrix.

  Raises:
    ValueError: If input is not a matrix of size at least 3x3.

  Returns:
    True if the 3x3 submatrix is a rotation (orthogonal).
Returns true if the 3x3 submatrix represents a rotation.
Returns true if the 3x3 submatrix represents a rotation .
def IsRotationMatrix(m):
  """Returns true if the 3x3 submatrix represents a rotation.

  Args:
    m: A transformation matrix.

  Raises:
    ValueError: If input is not a matrix of size at least 3x3.

  Returns:
    True if the 3x3 submatrix is a rotation (orthogonal).
  """
  if len(m.shape) != 2 or m.shape[0] < 3 or m.shape[1] < 3:
    raise ValueError('Matrix should be 3x3 or 4x4: %s\n %s' % (m.shape, m))
  rot = m[:3, :3]
  eye = np.matmul(rot, np.transpose(rot))
  return np.isclose(eye, np.identity(3), atol=1e-4).all()
def IsRotationMatrix ( m ) : if len ( m . shape ) != 2 or m . shape [ 0 ] < 3 or m . shape [ 1 ] < 3 : raise ValueError ( 'Matrix should be 3x3 or 4x4: %s\n %s' % ( m . shape , m ) ) rot = m [ : 3 , : 3 ] eye = np . matmul ( rot , np . transpose ( rot ) ) return np . isclose ( eye , np . identity ( 3 ) , atol = 1e-4 ) . all ( )