The ZeroDivisionError is a bug (I think this has been mentioned before, but I don't see an issue for it). If you substitute `0` instead of `0.0` it works fine.