Parameters ---------- points : ndarray A 2x2 numpy array of the form ``[[x0, y0], [x1, y1]]``. Notes ----- If you need to create a :class:`Bbox` object from another form of data, consider the static methods :meth:`unit`, :
(self, points, **kwargs)
| 755 | """ |
| 756 | |
| 757 | def __init__(self, points, **kwargs): |
| 758 | """ |
| 759 | Parameters |
| 760 | ---------- |
| 761 | points : ndarray |
| 762 | A 2x2 numpy array of the form ``[[x0, y0], [x1, y1]]``. |
| 763 | |
| 764 | Notes |
| 765 | ----- |
| 766 | If you need to create a :class:`Bbox` object from another form |
| 767 | of data, consider the static methods :meth:`unit`, |
| 768 | :meth:`from_bounds` and :meth:`from_extents`. |
| 769 | """ |
| 770 | BboxBase.__init__(self, **kwargs) |
| 771 | points = np.asarray(points, float) |
| 772 | if points.shape != (2, 2): |
| 773 | raise ValueError('Bbox points must be of the form ' |
| 774 | '"[[x0, y0], [x1, y1]]".') |
| 775 | self._points = points |
| 776 | self._minpos = np.array([np.inf, np.inf]) |
| 777 | self._ignore = True |
| 778 | # it is helpful in some contexts to know if the bbox is a |
| 779 | # default or has been mutated; we store the orig points to |
| 780 | # support the mutated methods |
| 781 | self._points_orig = self._points.copy() |
| 782 | if DEBUG: |
| 783 | ___init__ = __init__ |
| 784 |