def __init__(self, min_pt, max_pt, frame='unspecified'):
"""Initialize a box.
Parameters
----------
min_pt : :obj:`numpy.ndarray` of float
The minimum x, y, and (optionally) z points.
max_pt : :obj:`numpy.ndarray` of float
The maximum x, y, and (optionally) z points.
frame : :obj:`str`
The frame in which this box is placed.
Raises
------
ValueError
If max_pt is not strictly larger than min_pt in all dims.
"""
if np.any((max_pt - min_pt) < 0):
raise ValueError('Min point must be smaller than max point')
self._min_pt = min_pt
self._max_pt = max_pt
self._frame = frame
评论列表
文章目录