def log(x): if isinstance(x,se3.SE3): return se3.log6FromSE3(x) elif np.isscalar(x): return math.log(x) elif isinstance(x,np.matrix): if len(x)==4: return se3.log6FromMatrix(x) elif len(x)==3: return se3.log3(x) else: print 'Error only 3 and 4 matrices are allowed.' else: print 'Error log is only defined for real, matrix3, matrix4 and se3.SE3 objects.'
def log(x): if isinstance(x, se3.SE3): return se3.log6FromSE3(x) if np.isscalar(x): return math.log(x) if isinstance(x, np.ndarray): if len(x) == 4: return se3.log6FromMatrix(x) if len(x) == 3: return se3.log3(x) raise ValueError('Error only 3 and 4 matrices are allowed.') raise ValueError('Error log is only defined for real, matrix3, matrix4 and se3.SE3 objects.')
def log(x): if isinstance(x, se3.SE3): return se3.log6FromSE3(x) if np.isscalar(x): return math.log(x) if isinstance(x, np.ndarray): if len(x) == 4: return se3.log6FromMatrix(x) if len(x) == 3: return se3.log3(x) raise ValueError('Error only 3 and 4 matrices are allowed.') raise ValueError( 'Error log is only defined for real, matrix3, matrix4 and se3.SE3 objects.' )