-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Numpy version #114
Comments
Unfortunately, the problem is a silent killer: everything will run, but you could get incorrect results that are might be very hard to notice. Numpy 1.12 and earlier had a bug in conjugation that was fixed in 1.13. See issue #1 for details. In 1.12 and earlier, you should see this incorrect behavior: >>> import numpy as np
>>> import quaternion
>>> a = np.array([quaternion.one, quaternion.x, quaternion.y, quaternion.z])
>>> np.conjugate(a) # This gives the correct output
array([quaternion(1, -0, -0, -0), quaternion(0, -1, -0, -0),
quaternion(0, -0, -1, -0), quaternion(0, -0, -0, -1)], dtype=quaternion)
>>> a.conjugate() # This does not
array([quaternion(1, 0, 0, 0), quaternion(0, 1, 0, 0),
quaternion(0, 0, 1, 0), quaternion(0, 0, 0, 1)], dtype=quaternion) For numpy versions where the bug has been fixed, the correct result from that last line would look like this: >>> a.conjugate() # Correct result in np version >= 1.13
array([quaternion(1, 0, 0, 0), quaternion(0, 1, 0, 0),
quaternion(0, 0, 1, 0), quaternion(0, 0, 0, 1)], dtype=quaternion) Last time I tried, I couldn't really find any reasonably new packages for ARM on conda, but if at all possible, I would suggest that you use some sort of environment manager to get more recent versions. If you're confident that none of your code uses conjugation in this way, I suppose you could continue to use it, but don't blame me when your robot runs amok. ;) It looks like the only place in my code that uses it seems to be |
That was way too good of an answer, thanks mate! |
FYI, conda-forge has started supplying AArch64 builds of numpy, and it looks like it may be possible for me to select it as an option for the conda-forge build of quaternion in the near future. It looks like RPi 2B v1.2 and higher could use AArch64 (except that it looks like Raspbian comes with a 32-bit kernel by default at the moment, so it might not work out of the box for everyone). If you want to try that now, I think something like There's also some talk of conda-forge starting to support AArch32, and this is all a very active topic, so to anyone who's looking for RPi support, don't give up hope. |
I am currently using this package with default numpy 1.12 on RPi (debian stretch) and this seems to work for what I need (from_rotation_matrix, rotate_vectors). What are 1.13 specific features, that could cause an error?
The text was updated successfully, but these errors were encountered: