diff options
author | Stefan van der Walt <stefan@sun.ac.za> | 2008-02-07 11:42:03 +0000 |
---|---|---|
committer | Stefan van der Walt <stefan@sun.ac.za> | 2008-02-07 11:42:03 +0000 |
commit | 1845fe92109f611d441765d39fb0ac05fa5948b2 (patch) | |
tree | 035ea5dc481f436ccc369cdf07cb788b7b5f63be /numpy/ma | |
parent | 5bcb91deb60436a5505087c710920f502f9c7267 (diff) | |
download | numpy-1845fe92109f611d441765d39fb0ac05fa5948b2.tar.gz |
Remove .data comparisons in tests. Fix whitespace.
Diffstat (limited to 'numpy/ma')
-rw-r--r-- | numpy/ma/tests/test_core.py | 7 | ||||
-rw-r--r-- | numpy/ma/tests/test_old_ma.py | 2 |
2 files changed, 1 insertions, 8 deletions
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py index b9d58c4f5..347372b9b 100644 --- a/numpy/ma/tests/test_core.py +++ b/numpy/ma/tests/test_core.py @@ -501,13 +501,9 @@ class TestMA(NumpyTestCase): 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 @@ class TestArrayMethods(NumpyTestCase): 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 @@ class TestArrayMethods(NumpyTestCase): 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]]) # diff --git a/numpy/ma/tests/test_old_ma.py b/numpy/ma/tests/test_old_ma.py index c2da8b3f3..d4725b25a 100644 --- a/numpy/ma/tests/test_old_ma.py +++ b/numpy/ma/tests/test_old_ma.py @@ -255,11 +255,9 @@ class TestMa(NumpyTestCase): 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 |