mask.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:alchemy 作者: voidrank 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号