def test_rgb2xyz_conversion(self): gt = np.array([[[0.950456, 1., 1.088754], [0.538003, 0.787329, 1.06942], [0.592876, 0.28484, 0.969561], [0.180423, 0.072169, 0.950227]], [[0.770033, 0.927831, 0.138527], [0.35758, 0.71516, 0.119193], [0.412453, 0.212671, 0.019334], [0., 0., 0.]]]) assert_almost_equal(rgb2xyz(self.colbars_array), gt)
def test_rgb2xyz_conversion(self): gt = np.array([[[ 0.950456, 1. , 1.088754], [ 0.538003, 0.787329, 1.06942 ], [ 0.592876, 0.28484 , 0.969561], [ 0.180423, 0.072169, 0.950227]], [[ 0.770033, 0.927831, 0.138527], [ 0.35758 , 0.71516 , 0.119193], [ 0.412453, 0.212671, 0.019334], [ 0. , 0. , 0. ]]]) assert_almost_equal(rgb2xyz(self.colbars_array), gt)
def test_xyz2rgb_conversion(self): # only roundtrip test, we checked rgb2xyz above already assert_almost_equal(xyz2rgb(rgb2xyz(self.colbars_array)), self.colbars_array)