Return a :class:`Bbox` that contains all of the given bboxes.
(bboxes)
| 725 | |
| 726 | @staticmethod |
| 727 | def union(bboxes): |
| 728 | """ |
| 729 | Return a :class:`Bbox` that contains all of the given bboxes. |
| 730 | """ |
| 731 | if not len(bboxes): |
| 732 | raise ValueError("'bboxes' cannot be empty") |
| 733 | x0 = np.min([bbox.xmin for bbox in bboxes]) |
| 734 | x1 = np.max([bbox.xmax for bbox in bboxes]) |
| 735 | y0 = np.min([bbox.ymin for bbox in bboxes]) |
| 736 | y1 = np.max([bbox.ymax for bbox in bboxes]) |
| 737 | return Bbox([[x0, y0], [x1, y1]]) |
| 738 | |
| 739 | @staticmethod |
| 740 | def intersection(bbox1, bbox2): |
no test coverage detected