|
From: <jd...@us...> - 2009-11-06 15:02:31
|
Revision: 7941
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7941&view=rev
Author: jdh2358
Date: 2009-11-06 15:02:19 +0000 (Fri, 06 Nov 2009)
Log Message:
-----------
fix to int in afm to not crash on floats
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/afm.py
Modified: trunk/matplotlib/lib/matplotlib/afm.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/afm.py 2009-11-06 15:00:57 UTC (rev 7940)
+++ trunk/matplotlib/lib/matplotlib/afm.py 2009-11-06 15:02:19 UTC (rev 7941)
@@ -44,7 +44,10 @@
# than truncate). But I don't know what the best approach is now and
# this change to _to_int should at least prevent mpl from crashing on
# these JDH (2009-11-06)
-_to_int = lambda x: return int(float(x))
+
+def _to_int(x):
+ return int(float(x))
+
_to_float = float
_to_str = str
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|