|
From: <jd...@us...> - 2008-05-27 21:21:34
|
Revision: 5280
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5280&view=rev
Author: jdh2358
Date: 2008-05-27 14:21:32 -0700 (Tue, 27 May 2008)
Log Message:
-----------
added an isinit check in LinearSegmentedColormap.is_gray
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/colors.py
Modified: trunk/matplotlib/lib/matplotlib/colors.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/colors.py 2008-05-27 17:42:33 UTC (rev 5279)
+++ trunk/matplotlib/lib/matplotlib/colors.py 2008-05-27 21:21:32 UTC (rev 5280)
@@ -501,6 +501,7 @@
raise NotImplementedError("Abstract class only")
def is_gray(self):
+ if not self._isinit: self._init()
return (np.alltrue(self._lut[:,0] == self._lut[:,1])
and np.alltrue(self._lut[:,0] == self._lut[:,2]))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|