summaryrefslogtreecommitdiff
path: root/numpy/testing/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r--numpy/testing/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py
index f08796dc2..23b8de1f7 100644
--- a/numpy/testing/utils.py
+++ b/numpy/testing/utils.py
@@ -399,7 +399,8 @@ def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True):
"ACTUAL: %s\n" \
"DESIRED: %s\n" % (str(actual), str(desired)))
- if isinstance(actual, ndarray) or isinstance(desired, ndarray):
+ if isinstance(actual, (ndarray, tuple, list)) \
+ or isinstance(desired, (ndarray, tuple, list)):
return assert_array_almost_equal(actual, desired, decimal, err_msg)
msg = build_err_msg([actual, desired], err_msg, verbose=verbose,
header='Arrays are not almost equal')