def test_gamma(self): gamma = 1.5 cm.gamma(self.img, self.state, gamma) img = np.asarray(((self.state / 255.)**(1 / gamma)) * 255, dtype='uint8') assert_array_almost_equal(img, self.img)