This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cnewey
Recipients cnewey, docs@python
Date 2019-12-20.11:45:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576842313.59.0.109867222427.issue39108@roundup.psfhosted.org>
In-reply-to
Content
The Python 3 documentation for the "random" module mentions two possible ways to generate a random variate drawn from a normal distribution - "random.gauss" and "random.normalvariate" (see: https://docs.python.org/3/library/random.html#random.gauss).

It's not clear what the distinction is other than apparently the "random.gauss" function is faster. Digging through the source code, it eventually becomes apparent that "random.gauss" is NOT thread safe... but this isn't mentioned in the documentation anywhere.

Further, the documentation doesn't make explicit reference to the particular method used for generating these Gaussian variates.

Basically what I'm getting at is that it's difficult to tell which function ("gauss" or "randomvariate") I should be using. I feel that the documentation could be clarified here. I'm happy to do this in a PR at some point if required.
History
Date User Action Args
2019-12-20 11:45:13cneweysetrecipients: + cnewey, docs@python
2019-12-20 11:45:13cneweysetmessageid: <1576842313.59.0.109867222427.issue39108@roundup.psfhosted.org>
2019-12-20 11:45:13cneweylinkissue39108 messages
2019-12-20 11:45:12cneweycreate