def _update_lut(cmap, colors):
 cmap._lut[:256] = colors
 cmap._set_extremes()

def _update_lut ( cmap , colors ) : cmap . _lut [ : 256 ] = colors cmap . _set_extremes ( )
change the lut values in a matplotlib colormap in-place .