Skip to content

statistics: relax linear_regression input types#15249

Merged
hauntsaninja merged 1 commit into
python:mainfrom
hamdanal:statistics.linear_regression
Jan 11, 2026
Merged

statistics: relax linear_regression input types#15249
hauntsaninja merged 1 commit into
python:mainfrom
hamdanal:statistics.linear_regression

Conversation

@hamdanal

Copy link
Copy Markdown
Contributor

only len() and iteration are needed at runtime, this is accepted now

>>> import statistics
>>> d = {1: 10, 2: 20}
>>> statistics.linear_regression(d.keys(), d.values())
LinearRegression(slope=10.0, intercept=0.0)

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@hauntsaninja hauntsaninja left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hauntsaninja hauntsaninja merged commit 4092415 into python:main Jan 11, 2026
63 checks passed
@hamdanal hamdanal deleted the statistics.linear_regression branch January 11, 2026 09:48
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

Successfully merging this pull request may close these issues.

2 participants