def test_pts_in_bbs(self):
pt = np.array([1, 2])
bbs_a = np.array([1, 2, 3, 4])
assert isinstance(pts_in_bbs(pt, bbs_a), np.bool_)
assert pts_in_bbs(pt, bbs_a)
pts = np.array([
[1, 2],
[2, 3],
[3, 4]
])
bbs_b = np.array([
[1, 2, 3, 4],
[5, 6, 7, 8],
[2, 3, 4, 5]
])
assert (pts_in_bbs(pts, bbs_b) == np.array([1, 0, 1], dtype=np.bool)).all()
评论列表
文章目录