mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-132893: Minor edits to the statistics module PR (gh-133106)
This commit is contained in:
parent
219d8d24b5
commit
219b1f9d1d
2 changed files with 2 additions and 3 deletions
|
@ -810,8 +810,7 @@ def register(*kernels):
|
||||||
@register('normal', 'gauss')
|
@register('normal', 'gauss')
|
||||||
def normal_kernel():
|
def normal_kernel():
|
||||||
sqrt2pi = sqrt(2 * pi)
|
sqrt2pi = sqrt(2 * pi)
|
||||||
sqrt2 = sqrt(2)
|
neg_sqrt2 = -sqrt(2)
|
||||||
neg_sqrt2 = -sqrt2
|
|
||||||
pdf = lambda t: exp(-1/2 * t * t) / sqrt2pi
|
pdf = lambda t: exp(-1/2 * t * t) / sqrt2pi
|
||||||
cdf = lambda t: 1/2 * erfc(t / neg_sqrt2)
|
cdf = lambda t: 1/2 * erfc(t / neg_sqrt2)
|
||||||
invcdf = lambda t: _normal_dist_inv_cdf(t, 0.0, 1.0)
|
invcdf = lambda t: _normal_dist_inv_cdf(t, 0.0, 1.0)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Improved the accuracy of ``statistics.NormalDist.cdf`` for negative inputs.
|
Improved :meth:`statistics.NormalDist.cdf` accuracy for inputs smaller than the mean.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue