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
BUG: Fix error with 180 degree rotation in Rotation.align_vectors() with an infinite weight #20573
Merged
Conversation
This file contains 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
scottshambaugh
requested review from
tylerjereddy and
peterbell10
as code owners
April 24, 2024 15:12
github-actions
bot
added
scipy.spatial
Cython
Issues with the internal Cython code base
defect
A clear bug or issue that prevents SciPy from being installed or used as expected
labels
Apr 24, 2024
scottshambaugh
force-pushed
the
align_vectors_bug
branch
from
April 24, 2024 15:21
e56b0d1
to
ed9f2ce
Compare
nmayorov
reviewed
Apr 25, 2024
scottshambaugh
force-pushed
the
align_vectors_bug
branch
6 times, most recently
from
April 25, 2024 18:35
e6fd5c0
to
05bd338
Compare
nmayorov
reviewed
Apr 25, 2024
nmayorov
reviewed
Apr 25, 2024
nmayorov
reviewed
Apr 25, 2024
scottshambaugh
force-pushed
the
align_vectors_bug
branch
from
April 26, 2024 19:25
05bd338
to
6cb522d
Compare
Solid fix @scottshambaugh! Is it necessary to mention bug fixes in the release notes? I don't see a dedicated section for that here. |
nope |
tylerjereddy
added
the
backport-candidate
This fix should be ported by a maintainer to previous SciPy versions.
label
Apr 28, 2024
tylerjereddy
pushed a commit
to tylerjereddy/scipy
that referenced
this pull request
May 2, 2024
…ith an infinite weight (scipy#20573) * Fix exact rotations at 180 deg, improve near 180 deg Comments * Tests for exact near 180 deg rotations * Fix tests * Code review updates --------- Co-authored-by: Scott Shambaugh <scottshambaugh@users.noreply.github.com>
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport-candidate
This fix should be ported by a maintainer to previous SciPy versions.
Cython
Issues with the internal Cython code base
defect
A clear bug or issue that prevents SciPy from being installed or used as expected
scipy.spatial
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.
Reference issue
Closes #20555
What does this implement/fix?
There are two related issues with exact rotations near 180 degrees:
This fixes both. For the numerical instability part, near 180 degrees for the test case I'm seeing a pointing error of 2e-6 drop to 5e-9 (and now matches the non-exact code path to 1e-11). Tried to make the code path as compact as possible, but improvements welcome!