From: <ef...@us...> - 2008-04-15 17:42:03
|
Revision: 5043 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5043&view=rev Author: efiring Date: 2008-04-15 10:41:53 -0700 (Tue, 15 Apr 2008) Log Message: ----------- Speed up color mapping Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/colors.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2008-04-13 04:52:41 UTC (rev 5042) +++ trunk/matplotlib/CHANGELOG 2008-04-15 17:41:53 UTC (rev 5043) @@ -1,3 +1,5 @@ +2008-04-15 Speed up color mapping. - EF + 2008-04-12 Speed up zooming and panning of dense images. - EF 2008-04-11 Fix global font rcParam setting after initialization Modified: trunk/matplotlib/lib/matplotlib/colors.py =================================================================== --- trunk/matplotlib/lib/matplotlib/colors.py 2008-04-13 04:52:41 UTC (rev 5042) +++ trunk/matplotlib/lib/matplotlib/colors.py 2008-04-15 17:41:53 UTC (rev 5043) @@ -446,7 +446,7 @@ lut = (self._lut * 255).astype(npy.uint8) else: lut = self._lut - rgba = lut[xa] + rgba = lut.take(xa, axis=0) # twice as fast as lut[xa] if vtype == 'scalar': rgba = tuple(rgba[0,:]) return rgba This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |