summaryrefslogtreecommitdiff
path: root/scipy/test/testing.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2005-10-27 08:52:21 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2005-10-27 08:52:21 +0000
commit80a598c2820e332e26f758206eaa71133b6b84c1 (patch)
tree07cd4d397f8ad4c03873cfcdf568b950f9240b44 /scipy/test/testing.py
parenta74ef76e2f32e6de16fea37668daed0edb376fc6 (diff)
downloadnumpy-80a598c2820e332e26f758206eaa71133b6b84c1.tar.gz
Fixed assert_approx_equal(0,0) failure bug.
Diffstat (limited to 'scipy/test/testing.py')
-rw-r--r--scipy/test/testing.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scipy/test/testing.py b/scipy/test/testing.py
index 4a68f5168..aad87cc88 100644
--- a/scipy/test/testing.py
+++ b/scipy/test/testing.py
@@ -659,7 +659,7 @@ def assert_approx_equal(actual,desired,significant=7,err_msg='',verbose=1):
msg += err_msg
actual, desired = map(float, (actual, desired))
# Normalized the numbers to be in range (-10.0,10.0)
- scale = pow(10,math.floor(math.log10(0.5*(abs(desired)+abs(actual)))))
+ scale = float(pow(10,math.floor(math.log10(0.5*(abs(desired)+abs(actual))))))
try:
sc_desired = desired/scale
except ZeroDivisionError: