[Numpy-svn] r3982 - trunk/numpy/core/tests
numpy-svn at scipy.org
numpy-svn at scipy.org
Tue Aug 21 04:14:47 EDT 2007
Author: stefan
Date: 2007-08-21 03:14:20 -0500 (Tue, 21 Aug 2007)
New Revision: 3982
Modified:
trunk/numpy/core/tests/test_multiarray.py
Log:
Add record array test for putmask.
Modified: trunk/numpy/core/tests/test_multiarray.py
===================================================================
--- trunk/numpy/core/tests/test_multiarray.py 2007-08-21 07:57:01 UTC (rev 3981)
+++ trunk/numpy/core/tests/test_multiarray.py 2007-08-21 08:14:20 UTC (rev 3982)
@@ -443,6 +443,18 @@
self.failUnlessRaises(ValueError,N.putmask,
N.array([1,2,3]),[True],5)
+ def test_record_array(self):
+ rec = N.array([(-5, 2.0, 3.0), (5.0, 4.0, 3.0)],
+ dtype=[('x', '<f8'), ('y', '<f8'), ('z', '<f8')])
+ N.putmask(rec['x'],[True,False],10)
+ assert_array_equal(rec['x'],[10,5])
+
+ def test_masked_array(self):
+ ## x = N.array([1,2,3])
+ ## z = N.ma.array(x,mask=[True,False,False])
+ ## N.putmask(z,[True,True,True],3)
+ pass
+
# Import tests from unicode
set_local_path()
from test_unicode import *
More information about the Numpy-svn
mailing list