[Numpy-svn] r6457 - trunk/numpy/testing

numpy-svn at scipy.org numpy-svn at scipy.org
Sun Feb 22 17:10:42 EST 2009


Author: stefan
Date: 2009-02-22 16:10:30 -0600 (Sun, 22 Feb 2009)
New Revision: 6457

Modified:
   trunk/numpy/testing/utils.py
Log:
Allow subclasses of arrays in testing.

Modified: trunk/numpy/testing/utils.py
===================================================================
--- trunk/numpy/testing/utils.py	2009-02-22 13:48:21 UTC (rev 6456)
+++ trunk/numpy/testing/utils.py	2009-02-22 22:10:30 UTC (rev 6457)
@@ -240,9 +240,9 @@
 
 def assert_array_compare(comparison, x, y, err_msg='', verbose=True,
                          header=''):
-    from numpy.core import asarray, isnan, any
-    x = asarray(x)
-    y = asarray(y)
+    from numpy.core import array, isnan, any
+    x = array(x, copy=False, subok=True)
+    y = array(y, copy=False, subok=True)
 
     def isnumber(x):
         return x.dtype.char in '?bhilqpBHILQPfdgFDG'




More information about the Numpy-svn mailing list