@@ -2176,10 +2176,9 @@ def get_affine(self):
21762176 else :
21772177 x_mtx = self ._x .get_affine ().get_matrix ()
21782178 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 ]])
21832182 self ._affine = Affine2D (mtx )
21842183 self ._invalid = 0
21852184 return self ._affine
@@ -2229,10 +2228,9 @@ def get_matrix(self):
22292228 else :
22302229 x_mtx = self ._x .get_matrix ()
22312230 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 ]])
22362234 self ._inverted = None
22372235 self ._invalid = 0
22382236 return self ._mtx
0 commit comments