Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents eca42b6 + 07533e1 commit 01677fdCopy full SHA for 01677fd
1 file changed
lib/matplotlib/transforms.py
@@ -697,10 +697,13 @@ def union(bboxes):
697
"""Return a `Bbox` that contains all of the given *bboxes*."""
698
if not len(bboxes):
699
raise ValueError("'bboxes' cannot be empty")
700
- x0 = np.min([bbox.xmin for bbox in bboxes])
701
- x1 = np.max([bbox.xmax for bbox in bboxes])
702
- y0 = np.min([bbox.ymin for bbox in bboxes])
703
- y1 = np.max([bbox.ymax for bbox in bboxes])
+ # needed for 1.14.4 < numpy_version < 1.15
+ # can remove once we are at numpy >= 1.15
+ with np.errstate(invalid='ignore'):
+ x0 = np.min([bbox.xmin for bbox in bboxes])
704
+ x1 = np.max([bbox.xmax for bbox in bboxes])
705
+ y0 = np.min([bbox.ymin for bbox in bboxes])
706
+ y1 = np.max([bbox.ymax for bbox in bboxes])
707
return Bbox([[x0, y0], [x1, y1]])
708
709
@staticmethod
0 commit comments