def test_cut(self): """ Test cut. """ img = CImg((100, 100)) img.rand(-10, 10) img.cut(0, 1) max_val, min_val = img.max_min() self.assertEqual(max_val, 1) self.assertEqual(min_val, 0)
def test_max_min(self): """ Test max_min. """ img = CImg(np.array([[2, -1], [0, 4]])) self.assertEqual(img.max_min(), (4, -1))