diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2005-10-27 08:52:21 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2005-10-27 08:52:21 +0000 |
commit | 80a598c2820e332e26f758206eaa71133b6b84c1 (patch) | |
tree | 07cd4d397f8ad4c03873cfcdf568b950f9240b44 /scipy/test/testing.py | |
parent | a74ef76e2f32e6de16fea37668daed0edb376fc6 (diff) | |
download | numpy-80a598c2820e332e26f758206eaa71133b6b84c1.tar.gz |
Fixed assert_approx_equal(0,0) failure bug.
Diffstat (limited to 'scipy/test/testing.py')
-rw-r--r-- | scipy/test/testing.py | 2 |
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: |