I think there are some issues with true division vs. division on Python 2 with this code.