#NEWLINE# def labelmeanfilter_str( ys , x ) : #NEWLINE# #INDENT# ( unil , unilinv ) = np . unique ( ys , return_index = False , return_inverse = True ) #NEWLINE# labelmeans = np . array ( ndimage . mean ( x , labels = unilinv , index = np . arange ( ( np . max ( unil ) + 1 ) ) ) ) #NEWLINE# arr3 = labelmeans [ unilinv ] #NEWLINE# return arr3