code: def is_rotation(self, tol=1e-3, include_improper=True):
          
          det = np.abs(np.linalg.det(self))
          if include_improper:
              det = np.abs(det)
          return (np.abs(self.inv - self.trans) < tol).all() \
              and (np.abs(det - 1.) < tol)
docs: Test to see if tensor is a valid rotation matrix, performs a
          test to check whether the inverse is equal to the transpose
          and if the determinant is equal to one within the specified
          tolerance
  
          Args:
              tol (float): tolerance to both tests of whether the
                  the determinant is one and the inverse is equal
                  to the transpose
              include_improper (bool): whether to include improper
                  rotations in the determination of validity