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

numpy-svn at scipy.org numpy-svn at scipy.org
Wed Jul 26 18:47:51 EDT 2006


Author: stefan
Date: 2006-07-26 17:47:44 -0500 (Wed, 26 Jul 2006)
New Revision: 2912

Modified:
   trunk/numpy/core/tests/test_regression.py
Log:
Add test for ticket #203.


Modified: trunk/numpy/core/tests/test_regression.py
===================================================================
--- trunk/numpy/core/tests/test_regression.py	2006-07-26 22:22:46 UTC (rev 2911)
+++ trunk/numpy/core/tests/test_regression.py	2006-07-26 22:47:44 UTC (rev 2912)
@@ -312,6 +312,14 @@
         # Correct way
         N.array([(1,'object')],dt)
 
+    def check_recarray_single_element(self,level=rlevel):
+        """Ticket #202"""
+        a = N.array([1,2,3],dtype=N.int32)
+        b = a.copy()
+        r = N.rec.array(a,shape=1,formats=['3i4'],names=['d'])
+        assert_array_equal(a,b)
+        assert_equal(a,r[0][0])
+
     def check_zero_sized_array_indexing(self,level=rlevel):
         """Ticket #205"""
         tmp = N.array([])




More information about the Numpy-svn mailing list