[Python-checkins] cpython (2.7): Add info from the docstring for random.gammavariate() to the docs.
georg.brandl
python-checkins at python.org
Sat Sep 17 20:40:48 CEST 2011
http://hg.python.org/cpython/rev/169e07315ba5
changeset: 72395:169e07315ba5
branch: 2.7
parent: 72390:b5f4c4085ae6
user: Georg Brandl <georg at python.org>
date: Sat Sep 17 20:36:28 2011 +0200
summary:
Add info from the docstring for random.gammavariate() to the docs.
files:
Doc/library/random.rst | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -196,6 +196,7 @@
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
@@ -226,6 +227,12 @@
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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list