-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix bug in SymmetricalLogTransform. #14295
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
Conversation
By failing the copy the input array, SymmetricalLogTransform.transform_non_affine was returning an array with points in the linear range masked. Closes matplotlib#14265. Replaces matplotlib#14281.
Their transform_non_affine methods have been updated following the strategy used in LogTransform so that they work correctly with masked arrays or plain ndarrays, but do not require any explicit np.ma functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Thanks @efiring !
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free to suggest an improvement. |
…3.1.x Backport PR #14295: Fix bug in SymmetricalLogTransform.
Fix bug in SymmetricalLogTransform.
By failing the copy the input array, SymmetricalLogTransform.transform_non_affine
was returning an array with points in the linear range masked.
Closes #14265. Replaces #14281.
In addition to fixing the bug, this re-implements the SymmetricalLogTransform and its
inverse so that they gracefully handle ndarrays and masked arrays, returning outputs
of the same type as their inputs.
A test is added to check this, and to verify that a round-trip returns the input values.
PR Summary
PR Checklist