summaryrefslogtreecommitdiff
path: root/numpy/testing/utils.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2009-08-03 21:28:04 +0000
committerCharles Harris <charlesr.harris@gmail.com>2009-08-03 21:28:04 +0000
commit2537604cbcb61027706c358d6dd6afcd99a30686 (patch)
treea40a1dee31c7e351bc28b8ee565e906c2185d2e4 /numpy/testing/utils.py
parent6951bcd1d14a391e2ac2c88ea1a65c9973ab5968 (diff)
downloadnumpy-2537604cbcb61027706c358d6dd6afcd99a30686.tar.gz
Fix small bug in assert_almost_equal.
The comparison of complex numbers is still not quite right because errors can propagate between the real and imaginary parts. They can't be checked separately in general. However, this fix gets rid of the test errors currently showing.
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r--numpy/testing/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py
index a349ecf54..3e1a528ec 100644
--- a/numpy/testing/utils.py
+++ b/numpy/testing/utils.py
@@ -392,8 +392,8 @@ def assert_almost_equal(actual,desired,decimal=7,err_msg='',verbose=True):
desiredr = desired
desiredi = 0
try:
- assert_almost_equal(actualr, desiredr)
- assert_almost_equal(actuali, desiredi)
+ assert_almost_equal(actualr, desiredr, decimal=decimal)
+ assert_almost_equal(actuali, desiredi, decimal=decimal)
except AssertionError:
raise AssertionError("Items are not equal:\n" \
"ACTUAL: %s\n" \