Fix rate==0.0 bug in financial.

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 condition checking and the fix is successful. At the same time, broadcast is not  affected.