def test_bbox_transpose(): assert np.allclose(F.bbox_transpose((0.7, 0.1, 0.8, 0.4), 0, 100, 200), (0.1, 0.7, 0.4, 0.8)) assert np.allclose(F.bbox_transpose((0.7, 0.1, 0.8, 0.4), 1, 100, 200), (0.6, 0.2, 0.9, 0.3))
def test_bbox_transpose(): assert np.allclose(F.bbox_transpose([0.7, 0.1, 0.8, 0.4], 0, 100, 200), [0.1, 0.7, 0.4, 0.8]) assert np.allclose(F.bbox_transpose([0.7, 0.1, 0.8, 0.4], 1, 100, 200), [0.6, 0.2, 0.9, 0.3])