quaternion.rmul does not work with float
moble opened this issue · 3 comments
moble commented
But it does work with int:
>>> from npytypes.quaternion import quaternion
>>> quaternion(2.0, 3.0, 5.0, 7.0)*11.0
quaternion(22, 33, 55, 77)
>>> 11.0*quaternion(2.0, 3.0, 5.0, 7.0)
quaternion(9.24476e+18, 1.38671e+19, 2.31119e+19, 3.23567e+19)
>>> 11*quaternion(2.0, 3.0, 5.0, 7.0)
quaternion(22, 33, 55, 77)
mattip commented
This implementation seems to be actively maintained
moble commented
@mattip That's correct, I do maintain that quite actively, and have extended it substantially. In particular, the code above does work with the quaternion package:
>>> from quaternion import quaternion
>>> quaternion(2.0, 3.0, 5.0, 7.0)*11.0
quaternion(22, 33, 55, 77)
>>> 11.0*quaternion(2.0, 3.0, 5.0, 7.0)
quaternion(22, 33, 55, 77)
>>> 11*quaternion(2.0, 3.0, 5.0, 7.0)
quaternion(22, 33, 55, 77)Of course, since this bug is still present in this old implementation, I think this issue should be left open until it is fixed, or the repo is removed.
seberg commented
I am going to archive this repository. We have new-style DTypes and this has been inactive for many years. At this point development from the NumPy side should go towards new ones.
(There will be a new repository to start examples using the new DType API.)