def lab2lch(lab):
 lch = _prepare_lab_array(lab)
 (a, b) = (lch[..., 1], lch[..., 2])
 (lch[..., 1], lch[..., 2]) = _cart2polar_2pi(a, b)
 return lch

def lab2lch ( lab ) : lch = _prepare_lab_array ( lab ) ( a , b ) = ( lch [ ... , 1 ] , lch [ ... , 2 ] ) ( lch [ ... , 1 ] , lch [ ... , 2 ] ) = _cart2polar_2pi ( a , b ) return lch
cie-lab to cie-lch color space conversion .