def test_ioa(self):
    boxlist1 = np_box_list.BoxList(np.array([[0.25, 0.25, 0.75, 0.75], [0.0, 0.0, 0.5, 0.75]], dtype=np.float32))
    boxlist2 = np_box_list.BoxList(np.array([[0.5, 0.25, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0]], dtype=np.float32))
    ioa21 = np_box_list_ops.ioa(boxlist2, boxlist1)
    expected_ioa21 = np.array([[0.5, 0.0], [1.0, 1.0]], dtype=np.float32)
    self.assertAllClose(ioa21, expected_ioa21)
def test_ioa(self):
    boxlist1 = np_box_list.BoxList(np.array([[0.25, 0.25, 0.75, 0.75], [0.0, 0.0, 0.5, 0.75]], dtype=np.float32))
    boxlist2 = np_box_list.BoxList(np.array([[0.5, 0.25, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0]], dtype=np.float32))
    ioa21 = np_box_list_ops.ioa(boxlist2, boxlist1)
    expected_ioa21 = np.array([[0.5, 0.0], [1.0, 1.0]], dtype=np.float32)
    self.assertAllClose(ioa21, expected_ioa21)