@@ -1103,8 +1103,9 @@ def _iter_break_from_left_to_right(self):
11031103 right recursively. If self == ((A, N), A) then the result will be an
11041104 iterator which yields I : ((A, N), A), followed by A : (N, A),
11051105 followed by (A, N) : (A), but not ((A, N), A) : I.
1106- This is equivalent to flattening the stack then slicing it with
1107- ``flat_stack[i:]`` where i starts at 0 and ends at -1.
1106+
1107+ This is equivalent to flattening the stack then yielding
1108+ ``flat_stack[:i], flat_stack[i:]`` where i=0..(n-1).
11081109
11091110 """
11101111 yield IdentityTransform (), self
@@ -1136,11 +1137,12 @@ def __sub__(self, other):
11361137
11371138 # sometimes, when A contains the tree B there is no need to descend all the way down
11381139 # to the base of A (via B), instead we can just stop at B.
1139- (A, B) - (B)-1 == A
11401140
1141+ (A + B) - (B)^-1 == A
1142+
11411143 # similarly, when B contains tree A, we can avoid decending A at all, basically:
1142- A - B == (B - A).inverted() or B-1
1143-
1144+ A - (A + B) == ((B + A) - A).inverted() or B^ -1
1145+
11441146 For clarity, the result of ``(A + B) - B + B == (A + B)``.
11451147
11461148 """
@@ -1171,11 +1173,7 @@ def __array__(self, *args, **kwargs):
11711173 """
11721174 Array interface to get at this Transform's matrix.
11731175 """
1174- # note, this method is also used by C/C++ -based backends
1175- if self .is_affine :
1176- return self .get_matrix ()
1177- else :
1178- raise ValueError ('Cannot convert this transform to an array.' )
1176+ raise NotImplementedError ()
11791177
11801178 def transform (self , values ):
11811179 """
@@ -1870,10 +1868,6 @@ def __repr__(self):
18701868 return "BlendedGenericTransform(%s,%s)" % (self ._x , self ._y )
18711869 __str__ = __repr__
18721870
1873- def transform_affine (self , points ):
1874- return self .get_affine ().transform (points )
1875- transform_affine .__doc__ = Transform .transform_affine .__doc__
1876-
18771871 def transform_non_affine (self , points ):
18781872 if self ._x .is_affine and self ._y .is_affine :
18791873 return points
@@ -2092,10 +2086,6 @@ def transform_non_affine(self, points):
20922086 self ._a .transform (points ))
20932087 transform_non_affine .__doc__ = Transform .transform_non_affine .__doc__
20942088
2095- def transform_path_affine (self , path ):
2096- return self .get_affine ().transform_path_affine (path )
2097- transform_path_affine .__doc__ = Transform .transform_path_affine .__doc__
2098-
20992089 def transform_path_non_affine (self , path ):
21002090 if self ._a .is_affine and self ._b .is_affine :
21012091 return path
0 commit comments