[Numpy-svn] r2981 - trunk/numpy/core/tests

numpy-svn at scipy.org numpy-svn at scipy.org
Wed Aug 9 20:24:49 EDT 2006


Author: oliphant
Date: 2006-08-09 19:24:48 -0500 (Wed, 09 Aug 2006)
New Revision: 2981

Modified:
   trunk/numpy/core/tests/test_numerictypes.py
Log:
Add unit-test for recent comma-string updates

Modified: trunk/numpy/core/tests/test_numerictypes.py
===================================================================
--- trunk/numpy/core/tests/test_numerictypes.py	2006-08-10 00:14:42 UTC (rev 2980)
+++ trunk/numpy/core/tests/test_numerictypes.py	2006-08-10 00:24:48 UTC (rev 2981)
@@ -331,6 +331,12 @@
     multiple_rows = True
     _buffer = NbufferT
 
+class test_empty_field(NumpyTestCase):
+    def check_assign(self):
+        a = numpy.arange(10, dtype=numpy.float32)    
+        a.dtype = [("int",   "<0i4"),("float", "<2f4")]
+        assert(a['int'].shape == (5,0))
+        assert(a['float'].shape == (5,2))
 
 if __name__ == "__main__":
     NumpyTest().run()




More information about the Numpy-svn mailing list