[Numpy-svn] r4731 - in branches/maskedarray/numpy: core/tests ma

numpy-svn@scip... numpy-svn@scip...
Sun Jan 20 14:42:27 CST 2008


Author: stefan
Date: 2008-01-20 14:42:07 -0600 (Sun, 20 Jan 2008)
New Revision: 4731

Modified:
   branches/maskedarray/numpy/core/tests/test_regression.py
   branches/maskedarray/numpy/ma/extras.py
Log:
Fix concatenator usage (patch by Pierre).
Change N to np in regression test.


Modified: branches/maskedarray/numpy/core/tests/test_regression.py
===================================================================
--- branches/maskedarray/numpy/core/tests/test_regression.py	2008-01-18 23:25:32 UTC (rev 4730)
+++ branches/maskedarray/numpy/core/tests/test_regression.py	2008-01-20 20:42:07 UTC (rev 4731)
@@ -110,7 +110,7 @@
 
     def check_masked_array(self,level=rlevel):
         """Ticket #61"""
-        x = N.ma.array(1,mask=[1])
+        x = np.ma.array(1,mask=[1])
 
     def check_mem_masked_where(self,level=rlevel):
         """Ticket #62"""

Modified: branches/maskedarray/numpy/ma/extras.py
===================================================================
--- branches/maskedarray/numpy/ma/extras.py	2008-01-18 23:25:32 UTC (rev 4730)
+++ branches/maskedarray/numpy/ma/extras.py	2008-01-20 20:42:07 UTC (rev 4731)
@@ -35,7 +35,7 @@
 from numpy.core.numeric import array as nxarray
 from numpy.core.fromnumeric import asarray as nxasarray
 
-from numpy.lib.index_tricks import concatenator
+from numpy.lib.index_tricks import AxisConcatenator
 import numpy.lib.function_base as function_base
 
 #...............................................................................
@@ -595,13 +595,13 @@
 #---- --- Concatenation helpers ---
 #####--------------------------------------------------------------------------
 
-class mconcatenator(concatenator):
+class MAxisConcatenator(AxisConcatenator):
     """Translate slice objects to concatenation along an axis.
 
     """
 
     def __init__(self, axis=0):
-        concatenator.__init__(self, axis, matrix=False)
+        AxisConcatenator.__init__(self, axis, matrix=False)
 
     def __getitem__(self,key):
         if isinstance(key, str):
@@ -654,7 +654,7 @@
         res = concatenate(tuple(objs),axis=self.axis)
         return self._retval(res)
 
-class mr_class(mconcatenator):
+class mr_class(MAxisConcatenator):
     """Translate slice objects to concatenation along the first axis.
 
     For example:
@@ -663,7 +663,7 @@
 
     """
     def __init__(self):
-        mconcatenator.__init__(self, 0)
+        MAxisConcatenator.__init__(self, 0)
 
 mr_ = mr_class()
 



More information about the Numpy-svn mailing list