@@ -282,7 +282,7 @@ def __array__(self, *args, **kwargs):
282282
283283 def is_unit (self ):
284284 """Return whether this is the unit box (from (0, 0) to (1, 1))."""
285- return list ( self .get_points ().flatten ()) == [0. , 0. , 1. , 1. ]
285+ return self .get_points ().tolist () == [[ 0. , 0. ], [ 1. , 1. ] ]
286286
287287 @property
288288 def x0 (self ):
@@ -413,13 +413,13 @@ def size(self):
413413 @property
414414 def bounds (self ):
415415 """Return (:attr:`x0`, :attr:`y0`, :attr:`width`, :attr:`height`)."""
416- x0 , y0 , x1 , y1 = self .get_points (). flatten ()
416+ ( x0 , y0 ), ( x1 , y1 ) = self .get_points ()
417417 return (x0 , y0 , x1 - x0 , y1 - y0 )
418418
419419 @property
420420 def extents (self ):
421421 """Return (:attr:`x0`, :attr:`y0`, :attr:`x1`, :attr:`y1`)."""
422- return self .get_points ().flatten (). copy ()
422+ return self .get_points ().flatten () # flatten returns a copy.
423423
424424 def get_points (self ):
425425 raise NotImplementedError
@@ -1758,10 +1758,10 @@ def is_separable(self):
17581758
17591759 def to_values (self ):
17601760 """
1761- Return the values of the matrix as a sequence (a,b,c,d,e,f)
1761+ Return the values of the matrix as an `` (a, b, c, d, e, f)`` tuple.
17621762 """
17631763 mtx = self .get_matrix ()
1764- return tuple (mtx [:2 ].swapaxes (0 , 1 ).flatten () )
1764+ return tuple (mtx [:2 ].swapaxes (0 , 1 ).flat )
17651765
17661766 @staticmethod
17671767 def matrix_from_values (a , b , c , d , e , f ):
0 commit comments