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

numpy-svn at scipy.org numpy-svn at scipy.org
Sun Jul 20 19:59:32 EDT 2008


Author: charris
Date: 2008-07-20 18:59:29 -0500 (Sun, 20 Jul 2008)
New Revision: 5483

Modified:
   trunk/numpy/core/tests/test_regression.py
Log:
Fix broken regression test.

Modified: trunk/numpy/core/tests/test_regression.py
===================================================================
--- trunk/numpy/core/tests/test_regression.py	2008-07-20 23:58:48 UTC (rev 5482)
+++ trunk/numpy/core/tests/test_regression.py	2008-07-20 23:59:29 UTC (rev 5483)
@@ -1128,7 +1128,10 @@
     def test_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()
         assert( a[0].tolist() == b[0])
         assert( a[1].tolist() == b[1])




More information about the Numpy-svn mailing list