Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #79.
For a rotation below
unit_thresh, the complex conjugate eigenvalues can be close enough to one to pass the unit-eigenvalue check. Selecting the last passing eigenvector can then return a vector unrelated to the rotation axis, with the wrong norm and angle.Select the eigenvalue closest to one instead. Keep the last eigenvector on exact ties so identity/scaled-identity behavior stays unchanged, and preserve the existing strict threshold check, including zero, negative and NaN thresholds. Angle calculation and the public API are unchanged.
Tests cover small positive and negative rotations, two thresholds, unit axis length, signed rotation vectors, matrix reconstruction and threshold edge cases. The small-rotation regression fails on unchanged main. Existing identity, large-angle and invalid-matrix tests remain unchanged.
Validation:
git diff --checkpass.The proof workflow pins Ubuntu 22.04 for the older interpreters, disables fail-fast and skips only the token-protected Codecov upload. All original dependency specifications and test/coverage commands are retained. Source/test blobs match this branch exactly; no workflow change is included here.
The first proof attempt failed in the unchanged
test_ref_aff2sadnshear-reference test on Python 3.12. It does not callmat2axangle; the test itself notes its numerical instability. The complete unchanged baseline matrix passed, and the complete candidate matrix passed on rerun. No test, dependency or tolerance was changed to obtain the passing result.