mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-36018: Add special value tests and make minor tweaks to the docs (GH-12096)
https://bugs.python.org/issue36018
This commit is contained in:
parent
ae2ea33d5d
commit
ef17fdbc1c
3 changed files with 12 additions and 4 deletions
|
@ -735,7 +735,7 @@ class NormalDist:
|
|||
return exp((x - self.mu)**2.0 / (-2.0*variance)) / sqrt(tau * variance)
|
||||
|
||||
def cdf(self, x):
|
||||
'Cumulative density function: P(X <= x)'
|
||||
'Cumulative distribution function: P(X <= x)'
|
||||
if not self.sigma:
|
||||
raise StatisticsError('cdf() not defined when sigma is zero')
|
||||
return 0.5 * (1.0 + erf((x - self.mu) / (self.sigma * sqrt(2.0))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue