@@ -110,7 +110,7 @@ class TransformNode:
110
110
invalidated, even if 'self' is already invalid.
111
111
"""
112
112
113
- def __init__ (self , shorthand_name = None ):
113
+ def __init__ (self , shorthand_name = '' ):
114
114
"""
115
115
Parameters
116
116
----------
@@ -122,7 +122,7 @@ def __init__(self, shorthand_name=None):
122
122
self ._parents = {}
123
123
# Initially invalid, until first computation.
124
124
self ._invalid = self ._INVALID_FULL
125
- self ._shorthand_name = shorthand_name or ''
125
+ self ._shorthand_name = shorthand_name
126
126
127
127
if DEBUG :
128
128
def __str__ (self ):
@@ -671,6 +671,8 @@ def intersection(bbox1, bbox2):
671
671
y1 = np .minimum (bbox1 .ymax , bbox2 .ymax )
672
672
return Bbox ([[x0 , y0 ], [x1 , y1 ]]) if x0 <= x1 and y0 <= y1 else None
673
673
674
+ _default_minpos = np .array ([np .inf , np .inf ])
675
+
674
676
675
677
class Bbox (BboxBase ):
676
678
"""
@@ -766,7 +768,7 @@ def __init__(self, points, **kwargs):
766
768
raise ValueError ('Bbox points must be of the form '
767
769
'"[[x0, y0], [x1, y1]]".' )
768
770
self ._points = points
769
- self ._minpos = np . array ([ np . inf , np . inf ] )
771
+ self ._minpos = _default_minpos . copy ( )
770
772
self ._ignore = True
771
773
# it is helpful in some contexts to know if the bbox is a
772
774
# default or has been mutated; we store the orig points to
0 commit comments