[Numpy-svn] r4770 - branches/maskedarray/numpy/ma/tests

numpy-svn@scip... numpy-svn@scip...
Thu Feb 7 05:42:23 CST 2008


Author: stefan
Date: 2008-02-07 05:42:03 -0600 (Thu, 07 Feb 2008)
New Revision: 4770

Modified:
   branches/maskedarray/numpy/ma/tests/test_core.py
   branches/maskedarray/numpy/ma/tests/test_old_ma.py
Log:
Remove .data comparisons in tests.  Fix whitespace.


Modified: branches/maskedarray/numpy/ma/tests/test_core.py
===================================================================
--- branches/maskedarray/numpy/ma/tests/test_core.py	2008-02-06 23:17:35 UTC (rev 4769)
+++ branches/maskedarray/numpy/ma/tests/test_core.py	2008-02-07 11:42:03 UTC (rev 4770)
@@ -501,13 +501,9 @@
         x = masked_array([1,2,3], mask=[0,1,0])
         # Copy is False by default
         y = masked_array(x)
-#        assert_equal(id(y._data), id(x._data))
-#        assert_equal(id(y._mask), id(x._mask))
         assert_equal(y._data.ctypes.data, x._data.ctypes.data)
         assert_equal(y._mask.ctypes.data, x._mask.ctypes.data)
         y = masked_array(x, copy=True)
-#        assert_not_equal(id(y._data), id(x._data))
-#        assert_not_equal(id(y._mask), id(x._mask))
         assert_not_equal(y._data.ctypes.data, x._data.ctypes.data)
         assert_not_equal(y._mask.ctypes.data, x._mask.ctypes.data)
     #........................
@@ -1357,7 +1353,6 @@
                   dtype=[('a',int_),('b',float_),('c','|S8')])
         x[-1] = masked
         assert_equal(x.tolist(), [(1,1.1,'one'),(2,2.2,'two'),(None,None,None)])
-        
 
 
     def test_squeeze(self):
@@ -1426,7 +1421,7 @@
         assert_equal(b._mask, [1,1,0,0])
         #
         x = numpy.array([3,1,2])
-        b = a.compress(x >= 2, axis=1)    
+        b = a.compress(x >= 2, axis=1)
         assert_equal(b._data, [[10,30],[40,60]])
         assert_equal(b._mask, [[0,1],[1,0]])
     #

Modified: branches/maskedarray/numpy/ma/tests/test_old_ma.py
===================================================================
--- branches/maskedarray/numpy/ma/tests/test_old_ma.py	2008-02-06 23:17:35 UTC (rev 4769)
+++ branches/maskedarray/numpy/ma/tests/test_old_ma.py	2008-02-07 11:42:03 UTC (rev 4770)
@@ -255,11 +255,9 @@
         self.failUnless( y1.mask is m)
 
         y1a = array(y1, copy=0)
-        self.failUnless( y1a.data is y1.data)
         self.failUnless( y1a.mask is y1.mask)
 
         y2 = array(x1, mask=m, copy=0)
-        self.failUnless( y2.data is x1)
         self.failUnless( y2.mask is m)
         self.failUnless( y2[2] is masked)
         y2[2]=9



More information about the Numpy-svn mailing list