Revision: 6051 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6051&view=rev Author: jdh2358 Date: 2008-08-26 13:24:00 +0000 (Tue, 26 Aug 2008)
Log Message: ----------- some fixes for exceltools Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/mlab.py trunk/matplotlib/lib/mpl_toolkits/exceltools.py Modified: trunk/matplotlib/lib/matplotlib/mlab.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mlab.py 2008-08-25 22:21:49 UTC (rev 6050) +++ trunk/matplotlib/lib/matplotlib/mlab.py 2008-08-26 13:24:00 UTC (rev 6051) @@ -1818,16 +1818,23 @@ #helpers for loading, saving, manipulating and viewing numpy record arrays + def safe_isnan(x): 'isnan for arbitrary types' + if cbook.is_string_like(x): + return False try: b = np.isnan(x) except NotImplementedError: return False + except TypeError: return False else: return b def safe_isinf(x): 'isnan for arbitrary types' + if cbook.is_string_like(x): + return False try: b = np.isinf(x) except NotImplementedError: return False + except TypeError: return False else: return b def rec_append_field(rec, name, arr, dtype=None): Modified: trunk/matplotlib/lib/mpl_toolkits/exceltools.py =================================================================== --- trunk/matplotlib/lib/mpl_toolkits/exceltools.py 2008-08-25 22:21:49 UTC (rev 6050) +++ trunk/matplotlib/lib/mpl_toolkits/exceltools.py 2008-08-26 13:24:00 UTC (rev 6051) @@ -20,7 +20,7 @@ """ import copy -import numpy as npy +import numpy as np import pyExcelerator as excel import matplotlib.cbook as cbook import matplotlib.mlab as mlab @@ -97,7 +97,7 @@ rownum+=1 - ind = npy.arange(len(r.dtype.names)) + ind = np.arange(len(r.dtype.names)) for row in r: for i in ind: val = row[i] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins