… function. While the _statistics helper is private and not intended to be called directly, it is possible to do so. That would bypass the parameter validation checks in the pure python calling code. Accordingly, we need to add parameter checks to avoid undefined behavior (division by zero) or errors in the underlying functions (negative square root or non-positive argument for logarithm).
There was a problem hiding this comment.
@rhettinger LGTM for the code.
2 questions for this PR.
Don't we have to add this logic for pure python version?
Line 821 in ff603f6
We don't need unit tests for _normal_dist_inv_cdf with error handling?
|
@rhettinger |
|
@rhettinger: Please replace |
|
Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
|
GH-16160 is a backport of this pull request to the 3.8 branch. |
https://bugs.python.org/issue37798