@@ -2176,10 +2176,9 @@ def get_affine(self):
2176
2176
else :
2177
2177
x_mtx = self ._x .get_affine ().get_matrix ()
2178
2178
y_mtx = self ._y .get_affine ().get_matrix ()
2179
- # This works because we already know the transforms are
2180
- # separable, though normally one would want to set b and
2181
- # c to zero.
2182
- mtx = np .vstack ((x_mtx [0 ], y_mtx [1 ], [0.0 , 0.0 , 1.0 ]))
2179
+ # We already know the transforms are separable, so we can skip
2180
+ # setting b and c to zero.
2181
+ mtx = np .array ([x_mtx [0 ], y_mtx [1 ], [0.0 , 0.0 , 1.0 ]])
2183
2182
self ._affine = Affine2D (mtx )
2184
2183
self ._invalid = 0
2185
2184
return self ._affine
@@ -2229,10 +2228,9 @@ def get_matrix(self):
2229
2228
else :
2230
2229
x_mtx = self ._x .get_matrix ()
2231
2230
y_mtx = self ._y .get_matrix ()
2232
- # This works because we already know the transforms are
2233
- # separable, though normally one would want to set b and
2234
- # c to zero.
2235
- self ._mtx = np .vstack ((x_mtx [0 ], y_mtx [1 ], [0.0 , 0.0 , 1.0 ]))
2231
+ # We already know the transforms are separable, so we can skip
2232
+ # setting b and c to zero.
2233
+ self ._mtx = np .array ([x_mtx [0 ], y_mtx [1 ], [0.0 , 0.0 , 1.0 ]])
2236
2234
self ._inverted = None
2237
2235
self ._invalid = 0
2238
2236
return self ._mtx
0 commit comments