def test_n_dimensional_colour_correction_Vandermonde(self): """ Tests :func:`colour.characterisation.correction.\ colour_correction_Vandermonde` definition n-dimensions support. """ RGB = np.array([0.17224810, 0.09170660, 0.06416938]) RGB_c = np.array([0.15034881, 0.10503956, 0.10512517]) np.testing.assert_almost_equal(colour_correction_Vandermonde( RGB, M_T, M_R), RGB_c, decimal=7) RGB = np.tile(RGB, (6, 1)) RGB_c = np.tile(RGB_c, (6, 1)) np.testing.assert_almost_equal(colour_correction_Vandermonde( RGB, M_T, M_R), RGB_c, decimal=7) RGB = np.reshape(RGB, (2, 3, 3)) RGB_c = np.reshape(RGB_c, (2, 3, 3)) np.testing.assert_almost_equal(colour_correction_Vandermonde( RGB, M_T, M_R), RGB_c, decimal=7)
def test_n_dimensional_colour_correction_Vandermonde(self): """ Test :func:`colour.characterisation.correction.\ colour_correction_Vandermonde` definition n-dimensional support. """ RGB = np.array([0.17224810, 0.09170660, 0.06416938]) RGB_c = colour_correction_Vandermonde( RGB, MATRIX_TEST, MATRIX_REFERENCE ) RGB = np.tile(RGB, (6, 1)) RGB_c = np.tile(RGB_c, (6, 1)) np.testing.assert_almost_equal( colour_correction_Vandermonde(RGB, MATRIX_TEST, MATRIX_REFERENCE), RGB_c, decimal=7, ) RGB = np.reshape(RGB, (2, 3, 3)) RGB_c = np.reshape(RGB_c, (2, 3, 3)) np.testing.assert_almost_equal( colour_correction_Vandermonde(RGB, MATRIX_TEST, MATRIX_REFERENCE), RGB_c, decimal=7, )
def test_colour_correction_Vandermonde(self): """ Tests :func:`colour.characterisation.correction.\ colour_correction_Vandermonde` definition. """ RGB = np.array([0.17224810, 0.09170660, 0.06416938]) np.testing.assert_almost_equal( colour_correction_Vandermonde(RGB, M_T, M_R), np.array([0.15034881, 0.10503956, 0.10512517]), decimal=7) np.testing.assert_almost_equal( colour_correction_Vandermonde(RGB, M_T, M_R, degree=3), np.array([0.15747814, 0.10035799, 0.06616709]), decimal=7)