From 755460694e88abbb90f78cb19c86f4e40b6d0388 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 17 Sep 2011 20:20:04 +0200 Subject: Fix typo. --- Doc/library/datetime.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index e04b3f8..0ce9c14 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -30,7 +30,7 @@ set to an instance of a subclass of the abstract :class:`tzinfo` class. These :class:`tzinfo` objects capture information about the offset from UTC time, the time zone name, and whether Daylight Saving Time is in effect. Note that only one concrete :class:`tzinfo` class, the :class:`timezone` class, is supplied by the -:mod:`datetime` module. The :class:`timezone` class can reprsent simple +:mod:`datetime` module. The :class:`timezone` class can represent simple timezones with fixed offset from UTC such as UTC itself or North American EST and EDT timezones. Supporting timezones at whatever level of detail is required is up to the application. The rules for time adjustment across the -- cgit v0.12 From 73dd7c71f69b234fb1f3944efa1f08969b3ae3cc Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 17 Sep 2011 20:36:28 +0200 Subject: Add info from the docstring for random.gammavariate() to the docs. --- Doc/library/random.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Doc/library/random.rst b/Doc/library/random.rst index f0c4add..31cb945 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -163,6 +163,7 @@ be found in any statistics text. The end-point value ``b`` may or may not be included in the range depending on floating-point rounding in the equation ``a + (b-a) * random()``. + .. function:: triangular(low, high, mode) Return a random floating point number *N* such that ``low <= N <= high`` and @@ -191,6 +192,12 @@ be found in any statistics text. Gamma distribution. (*Not* the gamma function!) Conditions on the parameters are ``alpha > 0`` and ``beta > 0``. + The probability distribution function is:: + + x ** (alpha - 1) * math.exp(-x / beta) + pdf(x) = -------------------------------------- + math.gamma(alpha) * beta ** alpha + .. function:: gauss(mu, sigma) -- cgit v0.12