|
From: <ef...@us...> - 2008-04-23 16:54:23
|
Revision: 5065
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5065&view=rev
Author: efiring
Date: 2008-04-23 09:54:21 -0700 (Wed, 23 Apr 2008)
Log Message:
-----------
Allow for numpy 1.04, which does not have ma.masked_invalid
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/transforms.py
Modified: trunk/matplotlib/lib/matplotlib/transforms.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/transforms.py 2008-04-23 12:37:58 UTC (rev 5064)
+++ trunk/matplotlib/lib/matplotlib/transforms.py 2008-04-23 16:54:21 UTC (rev 5065)
@@ -693,7 +693,10 @@
if len(xy) == 0:
return
- xym = ma.masked_invalid(xy)
+ try:
+ xym = ma.masked_invalid(xy) # maybe add copy=False
+ except AttributeError: # masked_invalid not exposed in npy 1.04
+ xym = ma.masked_where(~npy.isfinite(xy), xy)
if (xym.count(axis=1)!=2).all():
return
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|