#NEWLINE# def set_sarr( self , sarr , callback = True ) : #NEWLINE# #INDENT# assert ( len ( sarr ) == 256 ) , RGBMapError ( ( 'shift map length %d != 256' % len ( sarr ) ) ) #NEWLINE# self . sarr = sarr . astype ( 'uint' ) #NEWLINE# self . scale_pct = 1.0 #NEWLINE# if callback : #NEWLINE# #INDENT# self . make_callback ( 'changed' )