Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue in matchProb #1

Open
yulangie opened this issue Apr 19, 2016 · 2 comments
Open

issue in matchProb #1

yulangie opened this issue Apr 19, 2016 · 2 comments

Comments

@yulangie
Copy link

Within matchProb() function a call to setGeneral function happens (line 57, 58) with more parameters than expected by setGeneral() which leads to a TypeError!

@ChapelHeel66
Copy link

ChapelHeel66 commented Mar 25, 2017

I think the (1-a) and (1-b) arguments could be eliminated, because those are game probabilities and the setGeneral function takes the service point probabilities and generates the game probabilities internally.

However, when I take out those two arguments, I get TypeError: unsupported operand type(s) for -: 'int' and 'tuple'. I think it is because setGeneral returns two results, both win and outcomes. My guess is that outcomes is the tuple, so in lines 57 and 58, the setGeneral function should probably call only the first result via an index [0]...maybe?

@ChapelHeel66
Copy link

Also, for anyone implementing this in Python 3.x, if you get TypeError: 'float' object cannot be interpreted as an integer, you may need to use // instead of / as the division operand everywhere that the variables sGames, svc and ret are divided in all the related functions. The // operand makes sure the quotient is returned as an integer, which is important in this code because sGames, svc and ret are all used in the range function and have to be integers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants