You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within matchProb() function a call to setGeneral function happens (line 57, 58) with more parameters than expected by setGeneral() which leads to a TypeError!
The text was updated successfully, but these errors were encountered:
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?
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.
Within matchProb() function a call to setGeneral function happens (line 57, 58) with more parameters than expected by setGeneral() which leads to a TypeError!
The text was updated successfully, but these errors were encountered: