-
Notifications
You must be signed in to change notification settings - Fork 11
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
Getting different results from two identical matrices #1
Comments
T2_numpy turns out to be "C contiguous" whereas T1_numpy is "F contiguous". (See the numpy documentation, specifically the Update: this appears to be a subtle issue with Eigency. From their README, under the "Storage layout" header, it seems that "to deal with the problem either in Python", we must:
My assessment is that PySophus should change order to F before passing to Eigency. |
Thanks for pointing this out! I have checked your example, and it did indeed result in erroneous results. I implemented the conversion from C_CONTIGUOUS to F_CONTIGUOUS as suggested, which unfortunately adds a copy operation. I also added a basic unit test based on your example to test the conversion. Could you confirm that this commit fully solves your issue? |
If I run the following code:
It is evident that T1_numpy and T2_numpy contain the same values up to some (very small) epsilon, because
print(np.allclose(T1_numpy,T2_numpy))
returns true.However,
print(SE3(T1_numpy))
gives me the following output:Whereas
print(SE3(T2_numpy))
gives me this:The two results should be the same! Instead, one is the inverse of the other! What is going on here? Is this a bug? Or have I missed something really obvious?
The text was updated successfully, but these errors were encountered: