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:
Raymond Hettinger 2019-02-28 09:16:25 -08:00 committed by Miss Islington (bot)
parent ae2ea33d5d
commit ef17fdbc1c
3 changed files with 12 additions and 4 deletions

View file

@ -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))))