From: <jo...@us...> - 2007-08-23 06:58:13
|
Revision: 3731 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3731&view=rev Author: jouni Date: 2007-08-22 23:58:10 -0700 (Wed, 22 Aug 2007) Log Message: ----------- Fix a buglet affecting getp: if a numpy object has shape==(), you cannot take its length. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/artist.py Modified: trunk/matplotlib/lib/matplotlib/artist.py =================================================================== --- trunk/matplotlib/lib/matplotlib/artist.py 2007-08-22 20:11:18 UTC (rev 3730) +++ trunk/matplotlib/lib/matplotlib/artist.py 2007-08-23 06:58:10 UTC (rev 3731) @@ -588,7 +588,7 @@ if self.is_alias(func): continue try: val = func() except: continue - if hasattr(val, 'shape') and len(val)>6: + if getattr(val, 'shape', ()) != () and len(val)>6: s = str(val[:6]) + '...' else: s = str(val) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |