BUG: Prevent division by zero. Closes #650.

Here is the update, thanks, I think it reads better too.

I'm not sure how to test this fix.

https://github.com/szpy/numpy/compare/bugfixes