Skip to content

Deprecate Transform.__array__ in favor of Transform.get_affine and Affine2D.__array__ #7975

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

Open
anntzer opened this issue Jan 28, 2017 · 1 comment
Labels
keep Items to be ignored by the “Stale” Github Action topic: transforms and scales

Comments

@anntzer
Copy link
Contributor

anntzer commented Jan 28, 2017

The Transform class defines an __array__ method so that it can be passed (as an affine transformation matrix) to C-level code. Unfortunately, such method necessarily drops the nonlinear part of the transform (which cannot be represented in the matrix), and does so silently, leading to bugs such as the one fixed by #7844.

I thus suggest deprecating Transform.__array__ while keeping a nondeprecated version in Affine2D.__array__. This will force to use Transform.get_affine() whereever necessary, thus making the dropping of the nonlinear part more obvious.

@github-actions
Copy link

github-actions bot commented Jun 5, 2023

This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label Jun 5, 2023
@anntzer anntzer added keep Items to be ignored by the “Stale” Github Action and removed status: inactive Marked by the “Stale” Github Action labels Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep Items to be ignored by the “Stale” Github Action topic: transforms and scales
Projects
None yet
Development

No branches or pull requests

2 participants