We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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?
to your account
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
assignee = None
closed_at = <Date 2021-05-21.03:22:49.037>
created_at = <Date 2021-05-16.18:56:52.909>
labels = ['type-feature', 'library', '3.11']
title = 'Add optional weights parameter to statistics.fmean()'
updated_at = <Date 2021-05-21.03:22:49.037>
user = 'https://github.com/rhettinger'
activity = <Date 2021-05-21.03:22:49.037>
actor = 'rhettinger'
assignee = 'none'
closed = True
closed_date = <Date 2021-05-21.03:22:49.037>
closer = 'rhettinger'
components = ['Library (Lib)']
creation = <Date 2021-05-16.18:56:52.909>
creator = 'rhettinger'
dependencies = 
files = 
hgrepos = 
issue_num = 44150
keywords = ['patch']
message_count = 1.0
messages = ['393751']
nosy_count = 2.0
nosy_names = ['rhettinger', 'steven.daprano']
pr_nums = ['26175']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue44150'
versions = ['Python 3.11']
The text was updated successfully, but these errors were encountered:
Weighted averages are another basic that we should support.
A professor assigns a grade for a course by weighting quizzes at 20%, homework at 20%, a midterm exam at 30%, and a final exam at 30%:
>>> grades = [85, 92, 83, 91]
>>> weights = [0.20, 0.20, 0.30, 0.30]
>>> fmean(grades, weights)
The API here matches that for harmonic_mean() and random.choices(), the other places where we support optional weights.
Sorry, something went wrong.
No branches or pull requests