Repository navigation
TST: Add tests for Affine2D - #27511
Merged
Merged
Conversation
QuLogic
commented
Dec 13, 2023
Comment on lines
+104
to
+105
| trans_rad = Affine2D().skew(np.pi / 12, np.pi / 12) | ||
| trans_deg = Affine2D().skew_deg(15, 15) |
Member
Author
There was a problem hiding this comment.
Thinking a bit more, this should probably skew different angles for x and y.
Member
Author
There was a problem hiding this comment.
Talked with @ksunden and decided to use a couple of back-calculated values that produce a reasonable set of results.
This is implicitly tested via all plots and layout. However, this makes it difficult to work on the transform stack directly, which these tests rectify.
QuLogic
force-pushed
the
affine-tests
branch
from
December 14, 2023 01:06
c7705e3 to
a840b85
Compare
ksunden
approved these changes
Dec 14, 2023
oscargus
approved these changes
Dec 14, 2023
oscargus
left a comment
Member
There was a problem hiding this comment.
One may consider using match for the error tests, but that was not present in the earlier code anyway, so no point in requiring it here.
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.
PR summary
This is implicitly tested via all plots and layout. However, this makes it difficult to work on the transform stack directly (cf #22191), which these tests rectify.
I deliberately chose points/angles that were easy to work out in my head, so hopefully there are not any edge cases that were missed here. (Except for
skew, for which I don't have an inherent idea of what that transform looks like, so I admit to just copy-pasting the existing output there.)PR checklist