KieranWynn / pyquaternion

A fully featured, pythonic library for representing and using quaternions
http://kieranwynn.github.io/pyquaternion/
MIT License
339 stars 68 forks source link

Init with tolerance test fails #50

Open theguruofreason opened 4 years ago

theguruofreason commented 4 years ago

test_init_from_explicit_matrix_with_optional_tolerance_arguments fails complaining that the matrix is not orthogonal within tolerance 1e-07. When I compute the dot of the matrix and its transpose using numpy I get:

[[ 1.00585937,  0.00373457,  0.00419048, -0.07654548],
[ 0.00373457,  1.00238021,  0.00267095, -0.04878795],
[ 0.00419048,  0.00267095,  1.00299717, -0.05474513],
[-0.07654548, -0.04878795, -0.05474513,  1.        ]]

suggesting that it is indeed very far out of tolerance.

sidml commented 4 years ago

This issue has been fixed. Perhaps you are not using the latest commit ? Please try pip install git+git://github.com/KieranWynn/pyquaternion Then you can pass your rtol and atol values like this Quaternion(matrix=some_matrix,rtol=1e-05, atol=1e-05) Note - The pip version is not updated.