Skip to content

Commit 01677fd

Browse files
authored
Merge pull request #15033 from tacaswell/fix_wheel_builds
FIX: un-break nightly wheels on py37
2 parents eca42b6 + 07533e1 commit 01677fd

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/matplotlib/transforms.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -697,10 +697,13 @@ def union(bboxes):
697697
"""Return a `Bbox` that contains all of the given *bboxes*."""
698698
if not len(bboxes):
699699
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])
700+
# needed for 1.14.4 < numpy_version < 1.15
701+
# can remove once we are at numpy >= 1.15
702+
with np.errstate(invalid='ignore'):
703+
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])
704707
return Bbox([[x0, y0], [x1, y1]])
705708

706709
@staticmethod

0 commit comments

Comments
 (0)