#NEWLINE# def test_XYZ100_to_CIELab( ) : #NEWLINE# #INDENT# from . gold_values import XYZ100_CIELab_gold_D65 , XYZ100_CIELab_gold_D50 #NEWLINE# check_conversion ( XYZ100_to_CIELab , CIELab_to_XYZ100 , XYZ100_CIELab_gold_D65 , b_min = [ 10 , ( - 30 ) , ( - 30 ) ] , b_max = [ 90 , 30 , 30 ] , XYZ100_w = 'D65' ) #NEWLINE# check_conversion ( XYZ100_to_CIELab , CIELab_to_XYZ100 , XYZ100_CIELab_gold_D50 , b_min = [ 10 , ( - 30 ) , ( - 30 ) ] , b_max = [ 90 , 30 , 30 ] , XYZ100_w = 'D50' ) #NEWLINE# XYZ100_1 = np . asarray ( XYZ100_CIELab_gold_D65 [ 0 ] [ 0 ] ) #NEWLINE# CIELab_1 = np . asarray ( XYZ100_CIELab_gold_D65 [ 0 ] [ 1 ] ) #NEWLINE# XYZ100_2 = np . asarray ( XYZ100_CIELab_gold_D50 [ 1 ] [ 0 ] ) #NEWLINE# CIELab_2 = np . asarray ( XYZ100_CIELab_gold_D50 [ 1 ] [ 1 ] ) #NEWLINE# XYZ100_mixed = np . concatenate ( ( XYZ100_1 [ np . newaxis , : ] , XYZ100_2 [ np . newaxis , : ] ) ) #NEWLINE# CIELab_mixed = np . concatenate ( ( CIELab_1 [ np . newaxis , : ] , CIELab_2 [ np . newaxis , : ] ) ) #NEWLINE# XYZ100_w_mixed = np . row_stack ( ( as_XYZ100_w ( 'D65' ) , as_XYZ100_w ( 'D50' ) ) ) #NEWLINE# assert np . allclose ( XYZ100_to_CIELab ( XYZ100_mixed , XYZ100_w = XYZ100_w_mixed ) , CIELab_mixed , rtol = 0.001 ) #NEWLINE# assert np . allclose ( CIELab_to_XYZ100 ( CIELab_mixed , XYZ100_w = XYZ100_w_mixed ) , XYZ100_mixed , rtol = 0.001 )