TehMillhouse / PyMarkovChain

Simple markov chain implementation in python
Other
97 stars 17 forks source link

For full compatability between python2 and python3, use python3 style "True division" #7

Closed elad661 closed 10 years ago

elad661 commented 10 years ago

For full compatability between python2 and python3, use python3 style "True division" Just add

from __future__ import division

if you want it to work in Python versions older than 2.2, then you can put a try-except block around this.

You talked about rounding errors in other bugs. Adding this will (probably) solve them.

TehMillhouse commented 10 years ago

Properly fixing issue #4 would do away with this, too, as that would entail getting rid of floating point arithmetic and only using integer arithmetic, but as I'm not sure when I'll get around to do that, I'll do this.

TehMillhouse commented 10 years ago

[done. see 0612e2]