tf-quaternion
tf-quaternion copied to clipboard
norm() should have a sqrt
EDIT: Given the definition of normalized quaternion, shouldn't norm() return self._q / self.abs(), because I was expecting the normalized quaternion when I called norm() and I am sure other people might make that mistake, given that you have a different method "abs()" for the actual norm of a quaternion
I also thought about this for some time. The main problem is that I initially wanted to resemble the API of moble's quaternion implementation to ease testing of tensorflow code. Given that this implementation now can handle multi-dimensional/batched quaternions which is not available in moble's implementation, maybe it's time to consider dropping the API compatibility and move to mathematically correct function names.
However, I'm not too sure what's the best way to transition. Despite the fact that the user base is extremely small, I don't want to break other people's code.What do you think of adding a deprecation warning for some time and then rename abs
to norm
and norm
to squared_norm
?
That sounds good!