-
Notifications
You must be signed in to change notification settings - Fork 13
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
Casting mutliple Match()
as Matches()
strips the rank
property from each Match()
`
#9
Comments
This is your example. You have a list of lists instead of a list of single match objects. match_stats = [
[Match([
{Player(6667): GaussianRating(25.0, 8.333)},
{Player(4991): GaussianRating(25.0, 8.333)}
], rank=[1, 2])],
[Match([
{Player(6615): GaussianRating(25.0, 8.333)},
{Player(7557): GaussianRating(25.0, 8.333)}
], rank=[1, 2])]
] Take off the extra brackets around the match objects: match_stats = [
Match([
{Player(6667): GaussianRating(25.0, 8.333)},
{Player(4991): GaussianRating(25.0, 8.333)}
], rank=[1, 2]),
Match([
{Player(6615): GaussianRating(25.0, 8.333)},
{Player(7557): GaussianRating(25.0, 8.333)}
], rank=[1, 2])
] I think it is confusing that you got back almost what you expected but without the rank. I'll have to decide if an error should be thrown or not. |
Thanks for your clarification–not sure how I missed that. I will have to rethink how I am generating the Match objects. As an aside: does the
the |
Yes. It's 2 lists that get matched up by order. Lowest number wins. Remember you can have more than 2 teams. |
Cast
match_stat
as Matches():This results in:
As a result, using
calculator
will result inAttributeError: Match does not have a ranking
.The text was updated successfully, but these errors were encountered: