diff options
author | Zackery Spytz <zspytz@gmail.com> | 2022-02-15 23:12:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-15 23:12:15 (GMT) |
commit | 08ec80113b3b7f7a9eaa3d217494536b63305181 (patch) | |
tree | 191ff93a92579d81ae5826a0e3e3cfe520e2d485 /Doc/library/random.rst | |
parent | 1d81fdc4c004511c25f74db0e04ddbbb8a04ce6d (diff) | |
download | cpython-08ec80113b3b7f7a9eaa3d217494536b63305181.zip cpython-08ec80113b3b7f7a9eaa3d217494536b63305181.tar.gz cpython-08ec80113b3b7f7a9eaa3d217494536b63305181.tar.bz2 |
bpo-46737: Add default arguments to random.gauss and normalvariate (GH-31360)
Diffstat (limited to 'Doc/library/random.rst')
-rw-r--r-- | Doc/library/random.rst | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Doc/library/random.rst b/Doc/library/random.rst index da4a4f6..96c6300 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -320,7 +320,7 @@ be found in any statistics text. math.gamma(alpha) * beta ** alpha -.. function:: gauss(mu, sigma) +.. function:: gauss(mu=0.0, sigma=1.0) Normal distribution, also called the Gaussian distribution. *mu* is the mean, and *sigma* is the standard deviation. This is slightly faster than @@ -333,6 +333,9 @@ be found in any statistics text. number generator. 2) Put locks around all calls. 3) Use the slower, but thread-safe :func:`normalvariate` function instead. + .. versionchanged:: 3.11 + *mu* and *sigma* now have default arguments. + .. function:: lognormvariate(mu, sigma) @@ -342,10 +345,13 @@ be found in any statistics text. zero. -.. function:: normalvariate(mu, sigma) +.. function:: normalvariate(mu=0.0, sigma=1.0) Normal distribution. *mu* is the mean, and *sigma* is the standard deviation. + .. versionchanged:: 3.11 + *mu* and *sigma* now have default arguments. + .. function:: vonmisesvariate(mu, kappa) |