Revision: 5996
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5996&view=rev
Author: efiring
Date: 2008-08-07 19:53:52 +0000 (Thu, 07 Aug 2008)
Log Message:
-----------
For non-Agg backends, handle inf as nan in path iterator
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/path.py
Modified: trunk/matplotlib/lib/matplotlib/path.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/path.py 2008-08-07 18:32:30 UTC (rev
5995)
+++ trunk/matplotlib/lib/matplotlib/path.py 2008-08-07 19:53:52 UTC (rev
5996)
@@ -170,8 +170,7 @@
codes = self.codes
len_vertices = len(vertices)
- isnan = np.isnan
- any = np.any
+ isfinite = np.isfinite
NUM_VERTICES = self.NUM_VERTICES
MOVETO = self.MOVETO
@@ -182,7 +181,7 @@
if codes is None:
next_code = MOVETO
for v in vertices:
- if any(isnan(v)):
+ if (~isfinite(v)).any():
next_code = MOVETO
else:
yield v, next_code
@@ -200,7 +199,7 @@
else:
num_vertices = NUM_VERTICES[int(code)]
curr_vertices = vertices[i:i+num_vertices].flatten()
- if any(isnan(curr_vertices)):
+ if (~isfinite(curr_vertices)).any():
was_nan = True
elif was_nan:
yield curr_vertices[-2:], MOVETO
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins