sublee / trueskill

An implementation of the TrueSkill rating system for Python
https://trueskill.org/
Other
742 stars 112 forks source link

RuntimeWarning when using numpy #4

Closed sublee closed 11 years ago

sublee commented 11 years ago

If numpy is installed in the environment, some input leads to RuntimeWarning.

>>> r1, r2 = Rating(mu=105.247, sigma=0.439), Rating(mu=27.030, sigma=0.901)
>>> transform_ratings([(r1,), (r2,)])
trueskill/factorgraph.py:144: RuntimeWarning: divide by zero encountered in double_scalars
  pi = 1. / sum(coeffs[x] ** 2 / divs[x].pi for x in xrange(size))
[(Rating(mu=105.247, sigma=0.447),), (Rating(mu=27.030, sigma=0.905),)]