-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-30464: Fix comment in gammavariate #1798
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. Thanks again to your contribution and we look forward to looking at it! |
@leodema, thanks for your PR! By analyzing the history of the files in this pull request, we identified @rhettinger, @tim-one and @tiran to be potential reviewers. |
LGTM. I think this can be merged as soon as the CLA detail is sorted out. The implementation change that @rhettinger refers to in the issue discussion can easily happen in a separate PR. |
@leodema I don't think the bpo number 46895 is a valid one. |
sorry guys! not sure where I got that bpo, thanks @Mariatta and @serhiy-storchaka for fixing it |
Hi @leodema - @rhettinger commented on the bpo on 5/25 to request additional changes, please take a look when you get a chance. Thanks! |
Hi @csabella I'll be happy to but I thought it would be part of a separate PR as @mdickinson suggested in a later post, but ok I will do it here, thanks. |
@leodema I apologize. I didn't see that earlier comment. You can ignore what I said earlier. |
Let's merge this. It's an obvious fix that's mathematically correct and that Raymond has already approved in the issue discussion. |
A comment in the gammavariate function in random.py make it seems that when alpha is 1 it's equivalent on calling expovariate(1), but it should be expovariate(1/beta)
also discussed in:
https://mail.python.org/pipermail/python-bugs-list/2001-January/003752.html
where Ivan Frohne says:
Now it happens that a gamma-distributed random variable with parameters A =
1 and B has the (much simpler) exponential distribution with density
function