Repository navigation
Conversation
xiehuanyi
requested review from
jbarry-bdai,
petercorke and
taughz
as code owners
October 10, 2026 17:33
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.
wrap_mpi2_pi2()returns latitude angles outside its documented[-pi/2, pi/2]range after complete turns:wrap_mpi2_pi2(2*pi)currently returns-2*pi, and3*pi/2is left unchanged.Reduce complete turns while preserving the sign and precision of small angles, then reflect the remaining angle about the poles. Scalar/vector return behavior is unchanged, and the general
angle_wrap(..., mode="-pi/2:pi/2")dispatcher receives the same correction.Regression tests cover positive/negative complete and half turns from -4pi through4pi, scalar/vector forms, the dispatcher, both sides of each pole, exact1e-16 angles and empty vectors. The multiple-turn regression fails before the fix. All20 vector tests pass after it; the broader base suite passes149 tests with1 skip and5 existing warnings. The repository-pinned Black23.10.0 and
git diff --checkpass.Prepared with AI assistance.