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
mean([True, True, True, False]) should be 0.75, but it returns 0.25.
The fix is to change _sum so that when the type is bool, the result should be coerced to int, not bool.
Why it is important for statistics.mean to work with bools:
It is natural to say something like
mean(x > threshold for x in data)
and expect to get the percentage of items in data that are above threshold.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: