def test_clip_to_window(self):
    boxlist = np_box_list.BoxList(np.array([[0.25, 0.25, 0.75, 0.75], [0.0, 0.0, 0.5, 0.75], [(- 0.2), (- 0.3), 0.7, 1.5]], dtype=np.float32))
    boxlist_clipped = np_box_list_ops.clip_to_window(boxlist, [0.0, 0.0, 1.0, 1.0])
    expected_boxlist_clipped = np_box_list.BoxList(np.array([[0.25, 0.25, 0.75, 0.75], [0.0, 0.0, 0.5, 0.75], [0.0, 0.0, 0.7, 1.0]], dtype=np.float32))
    self.assertAllClose(expected_boxlist_clipped.get(), boxlist_clipped.get())
def test_clip_to_window(self):
    boxlist = np_box_list.BoxList(np.array([[0.25, 0.25, 0.75, 0.75], [0.0, 0.0, 0.5, 0.75], [(- 0.2), (- 0.3), 0.7, 1.5]], dtype=np.float32))
    boxlist_clipped = np_box_list_ops.clip_to_window(boxlist, [0.0, 0.0, 1.0, 1.0])
    expected_boxlist_clipped = np_box_list.BoxList(np.array([[0.25, 0.25, 0.75, 0.75], [0.0, 0.0, 0.5, 0.75], [0.0, 0.0, 0.7, 1.0]], dtype=np.float32))
    self.assertAllClose(expected_boxlist_clipped.get(), boxlist_clipped.get())