Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
Open
@anntzer

Description

@anntzer
Issue body actions

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.