[Numpy-svn] r5482 - branches/1.1.x/numpy/core/tests

numpy-svn@scip... numpy-svn@scip...
Sun Jul 20 18:58:51 CDT 2008


Author: charris
Date: 2008-07-20 18:58:48 -0500 (Sun, 20 Jul 2008)
New Revision: 5482

Modified:
   branches/1.1.x/numpy/core/tests/test_regression.py
Log:
Fix broken regression test.

Modified: branches/1.1.x/numpy/core/tests/test_regression.py
===================================================================
--- branches/1.1.x/numpy/core/tests/test_regression.py	2008-07-20 23:35:47 UTC (rev 5481)
+++ branches/1.1.x/numpy/core/tests/test_regression.py	2008-07-20 23:58:48 UTC (rev 5482)
@@ -1057,10 +1057,11 @@
     def check_recarray_tolist(self, level=rlevel):
         """Ticket #793, changeset r5215
         """
-        a = np.recarray(2, formats="i4,f8,f8", names="id,x,y")
+        # Comparisons fail for NaN, so we can't use random memory
+        # for the test.
+        buf = np.zeros(40, dtype=np.int8)
+        a = np.recarray(2, formats="i4,f8,f8", names="id,x,y", buf=buf)
         b = a.tolist()
-        print a[0].tolist(), b[0]
-        print a[1].tolist(), b[1]
         assert( a[0].tolist() == b[0])
         assert( a[1].tolist() == b[1])
 



More information about the Numpy-svn mailing list