What does the following error:
Warning: overflow encountered in exp
in scipy/numpy using Python generally mean? I\'m computing a ratio in log
Isn't exp(log(a) - log(b))
the same as exp(log(a/b))
which is the same as a/b
?
>>> from math import exp, log
>>> exp(log(100) - log(10))
10.000000000000002
>>> exp(log(1000) - log(10))
99.999999999999957
2010-12-07: If this is so "some values in the array b are intentionally set to 0", then you are essentially dividing by 0. That sounds like a problem.