[Python-checkins] gh-104337: Clarify random.gammavariate doc entry (#104410)
terryjreedy
webhook-mailer at python.org
Sun May 14 14:46:03 EDT 2023
https://github.com/python/cpython/commit/88c5c586708dcff369c49edae947d487a80f0346
commit: 88c5c586708dcff369c49edae947d487a80f0346
branch: main
author: Terry Jan Reedy <tjreedy at udel.edu>
committer: terryjreedy <tjreedy at udel.edu>
date: 2023-05-14T14:45:54-04:00
summary:
gh-104337: Clarify random.gammavariate doc entry (#104410)
* gh-104337: Clarify random.gammavariate doc entry
* Fix parameter markup.
files:
M Doc/library/random.rst
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index c192919ac62e..76ae97a8be7e 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -334,8 +334,10 @@ be found in any statistics text.
.. function:: gammavariate(alpha, beta)
- Gamma distribution. (*Not* the gamma function!) Conditions on the
- parameters are ``alpha > 0`` and ``beta > 0``.
+ Gamma distribution. (*Not* the gamma function!) The shape and
+ scale parameters, *alpha* and *beta*, must have positive values.
+ (Calling conventions vary and some sources define 'beta'
+ as the inverse of the scale).
The probability distribution function is::
@@ -346,7 +348,8 @@ be found in any statistics text.
.. function:: gauss(mu=0.0, sigma=1.0)
- Normal distribution, also called the Gaussian distribution. *mu* is the mean,
+ Normal distribution, also called the Gaussian distribution.
+ *mu* is the mean,
and *sigma* is the standard deviation. This is slightly faster than
the :func:`normalvariate` function defined below.
More information about the Python-checkins
mailing list