numpy/numpy — pull request #5128 by liufei11111 (2014-09-27 18:05:19+00:00)
Title: rate==0.0 fix

Original issue:
https://github.com/numpy/numpy/issues/5046
This bug is caused by using numpy.where.
This command will evaluate both expression first and then return based on condition. However, if rate==0.0, the expression will cause an error anyway. We replace the same process with a if condition and the fix is successful.