Revision: 4788
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4788&view=rev
Author:   efiring
Date:     2007-12-25 23:23:27 -0800 (Tue, 25 Dec 2007)

Log Message:
-----------
Make numerix.ma and numerix.npyma work with numpy 1.05

The numpy maskedarray branch is scheduled to become the
trunk for 1.05.  It includes a change from ma.py being in
numpy/core to ma being a module under numpy, so the import
syntax is different in numerix.ma and numerix.npyma.

Modified Paths:
--------------
    trunk/matplotlib/CHANGELOG
    trunk/matplotlib/lib/matplotlib/numerix/ma/__init__.py
    trunk/matplotlib/lib/matplotlib/numerix/npyma/__init__.py

Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG  2007-12-21 19:40:59 UTC (rev 4787)
+++ trunk/matplotlib/CHANGELOG  2007-12-26 07:23:27 UTC (rev 4788)
@@ -1,3 +1,7 @@
+2007-12-25 Changed masked array importing to work with the upcoming
+           numpy 1.05 (now the maskedarray branch) as well as with
+           earlier versions. - EF
+
 2007-12-16 rec2csv saves doubles without losing precision. Also, it
            does not close filehandles passed in open. - JDH,ADS
 

Modified: trunk/matplotlib/lib/matplotlib/numerix/ma/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/numerix/ma/__init__.py      2007-12-21 
19:40:59 UTC (rev 4787)
+++ trunk/matplotlib/lib/matplotlib/numerix/ma/__init__.py      2007-12-26 
07:23:27 UTC (rev 4788)
@@ -13,7 +13,10 @@
         from maskedarray import *
         print "using maskedarray"
     else:
-        from numpy.core.ma import *
+        try:
+            from numpy.ma import *        # numpy 1.05 and later
+        except ImportError:
+            from numpy.core.ma import *   # earlier
         #print "using ma"
     def getmaskorNone(obj):
         _msk = getmask(obj)

Modified: trunk/matplotlib/lib/matplotlib/numerix/npyma/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/numerix/npyma/__init__.py   2007-12-21 
19:40:59 UTC (rev 4787)
+++ trunk/matplotlib/lib/matplotlib/numerix/npyma/__init__.py   2007-12-26 
07:23:27 UTC (rev 4788)
@@ -4,5 +4,8 @@
     from maskedarray import *
     print "using maskedarray"
 else:
-    from numpy.core.ma import *
+    try:
+        from numpy.ma import *        # numpy 1.05 and later
+    except ImportError:
+        from numpy.core.ma import *   # earlier
     #print "using ma"


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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to