Skip to content
Browse files

- version up: 0.1.3

- Matrix.determinant returns float
- make doctest safer
  • Loading branch information...
1 parent 77e628e commit 46914d358dacd3257a0d8f000db2cb445f233f9f @sublee committed Mar 11, 2012
Showing with 6 additions and 5 deletions.
  1. +1 −1 setup.py
  2. +4 −3 trueskill/__init__.py
  3. +1 −1 trueskill/mathematics.py
View
2 setup.py
@@ -44,7 +44,7 @@ def run_tests():
setup(
name='trueskill',
- version='0.1.2',
+ version='0.1.3',
url='https://github.com/sublee/trueskill/',
license='BSD',
author='Heungsub Lee',
View
7 trueskill/__init__.py
@@ -355,9 +355,10 @@ def match_quality(self, rating_groups):
is the draw probability in the association.
>>> env = TrueSkill()
- >>> env.match_quality([(env.Rating(25, 0.001),),
- ... (env.Rating(25, 0.001),)])
- 0.9999999712000012
+ >>> rating_groups = [(env.Rating(25, 0.001),),
+ ... (env.Rating(25, 0.001),)]
+ >>> print env.match_quality(rating_groups)
+ 0.9999999712
:param rating_groups: a list of tuples that contain :class:`Rating`
objects
View
2 trueskill/mathematics.py
@@ -181,7 +181,7 @@ def determinant(self):
pivot, r = max((abs(tmp[r][c]), r) for r in xrange(c + 1))
pivot = tmp[r][c]
if not pivot:
- return 0
+ return 0.
tmp[r], tmp[c] = tmp[c], tmp[r]
if r != c:
rv = -rv

0 comments on commit 46914d3

Please sign in to comment.
Something went wrong with that request. Please try again.