summaryrefslogtreecommitdiff
path: root/numpy/testing/utils.py
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2009-02-22 22:10:30 +0000
committerStefan van der Walt <stefan@sun.ac.za>2009-02-22 22:10:30 +0000
commit925774d3227944e80a7a01699131124dd1abfb44 (patch)
tree2565a3f9a2f9c79b89ec302a5c1c5cf85ae208b0 /numpy/testing/utils.py
parent34f564a48d8530dc21fe59c13d35879fd6808bf7 (diff)
downloadnumpy-925774d3227944e80a7a01699131124dd1abfb44.tar.gz
Allow subclasses of arrays in testing.
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r--numpy/testing/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py
index 345f87912..27c371f1e 100644
--- a/numpy/testing/utils.py
+++ b/numpy/testing/utils.py
@@ -240,9 +240,9 @@ def assert_approx_equal(actual,desired,significant=7,err_msg='',verbose=True):
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'