#NEWLINE# def apply_matrix( matrix , triplet ) : #NEWLINE# #INDENT# 'Apply a matrix on a value triplet\n\n    Args:\n        matrix (3x3 numpy.matrix): matrix to apply (ex : RGB to XYZ matrix)\n\n        triplet ([float, float, float]: ex. RGB or XYZ values\n\n    Returns:\n        .[float, float, float]\n\n    ' #NEWLINE# values = numpy . matrix ( values ) #NEWLINE# return numpy . dot ( matrix , values . T ) . T . tolist ( ) [ 0 ]