Open
Description
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.