@@ -1418,24 +1418,29 @@ def contains_branch(self, other):
1418
1418
return True
1419
1419
return False
1420
1420
1421
- def contains_branch_seperately (self , other_transform ):
1421
+ def contains_branch_separately (self , other_transform ):
1422
1422
"""
1423
1423
Return whether the given branch is a sub-tree of this transform on
1424
1424
each separate dimension.
1425
1425
1426
1426
A common use for this method is to identify if a transform is a blended
1427
1427
transform containing an Axes' data transform. e.g.::
1428
1428
1429
- x_isdata, y_isdata = trans.contains_branch_seperately (ax.transData)
1429
+ x_isdata, y_isdata = trans.contains_branch_separately (ax.transData)
1430
1430
1431
1431
"""
1432
1432
if self .output_dims != 2 :
1433
- raise ValueError ('contains_branch_seperately only supports '
1433
+ raise ValueError ('contains_branch_separately only supports '
1434
1434
'transforms with 2 output dimensions' )
1435
1435
# for a non-blended transform each separate dimension is the same, so
1436
1436
# just return the appropriate shape.
1437
1437
return (self .contains_branch (other_transform ), ) * 2
1438
1438
1439
+ # Permanent alias for backwards compatibility (historical typo)
1440
+ def contains_branch_seperately (self , other_transform ):
1441
+ """:meta private:"""
1442
+ return self .contains_branch_separately (other_transform )
1443
+
1439
1444
def __sub__ (self , other ):
1440
1445
"""
1441
1446
Compose *self* with the inverse of *other*, cancelling identical terms
@@ -2185,7 +2190,7 @@ def __eq__(self, other):
2185
2190
else :
2186
2191
return NotImplemented
2187
2192
2188
- def contains_branch_seperately (self , transform ):
2193
+ def contains_branch_separately (self , transform ):
2189
2194
return (self ._x .contains_branch (transform ),
2190
2195
self ._y .contains_branch (transform ))
2191
2196
@@ -2411,14 +2416,14 @@ def _iter_break_from_left_to_right(self):
2411
2416
for left , right in self ._b ._iter_break_from_left_to_right ():
2412
2417
yield self ._a + left , right
2413
2418
2414
- def contains_branch_seperately (self , other_transform ):
2419
+ def contains_branch_separately (self , other_transform ):
2415
2420
# docstring inherited
2416
2421
if self .output_dims != 2 :
2417
- raise ValueError ('contains_branch_seperately only supports '
2422
+ raise ValueError ('contains_branch_separately only supports '
2418
2423
'transforms with 2 output dimensions' )
2419
2424
if self == other_transform :
2420
2425
return (True , True )
2421
- return self ._b .contains_branch_seperately (other_transform )
2426
+ return self ._b .contains_branch_separately (other_transform )
2422
2427
2423
2428
depth = property (lambda self : self ._a .depth + self ._b .depth )
2424
2429
is_affine = property (lambda self : self ._a .is_affine and self ._b .is_affine )
0 commit comments