-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
gh-140938: Raise ValueError for infinite inputs to stdev/pstdev #141531
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
Conversation
| expected = self.func(data) | ||
| self.assertEqual(self.func(iter(data)), expected) | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line removal wasn't intended.
Misc/NEWS.d/next/Library/2025-11-13-14-51-30.gh-issue-140938.kXsHHv.rst
Outdated
Show resolved
Hide resolved
Misc/NEWS.d/next/Library/2025-11-13-14-51-30.gh-issue-140938.kXsHHv.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…XsHHv.rst Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…XsHHv.rst Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
Thanks @rhettinger for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…pythonGH-141531) Raise ValueError for infinite inputs to stdev/pstdev (cherry picked from commit f0a8bc737ab2f04d4196eee154cb1e17e26ad585) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com> --- Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
GH-141575 is a backport of this pull request to the 3.14 branch. |
|
Sorry, @rhettinger and @gpshead, I could not cleanly backport this to |
GH-141531) (#141575) gh-140938: Raise ValueError for infinite inputs to stdev/pstdev (GH-141531) Raise ValueError for infinite inputs to stdev/pstdev (cherry picked from commit f0a8bc7) --- Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com> Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…pythonGH-141531) Raise ValueError for infinite inputs to stdev/pstdev --- Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com> Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> (cherry picked from commit f0a8bc7)
|
GH-141584 is a backport of this pull request to the 3.13 branch. |
GH-141531) (#141584) gh-140938: Raise ValueError for infinite inputs to stdev/pstdev (GH-141531) Raise ValueError for infinite inputs to stdev/pstdev --- (cherry picked from commit f0a8bc7) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
Greg, does this seem like a reasonable fix?
statistics.stdev()raisesAttributeErrorwhen data contains infinity #140938