Skip to content
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

Merged
merged 1 commit into from
Jun 4, 2017

Conversation

leodema
Copy link
Contributor

@leodema leodema commented May 24, 2017

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

g(x; 1, B) = exp(-x/B) / B.

@the-knights-who-say-ni
Copy link

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!

@mention-bot
Copy link

@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.

@mdickinson
Copy link
Member

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.

@Mariatta
Copy link
Member

@leodema I don't think the bpo number 46895 is a valid one.
Can you please check? Thanks.

@serhiy-storchaka serhiy-storchaka changed the title bpo-46895: Fix comment in gammavariate bpo-30464: Fix comment in gammavariate May 27, 2017
@leodema
Copy link
Contributor Author

leodema commented May 27, 2017

sorry guys! not sure where I got that bpo, thanks @Mariatta and @serhiy-storchaka for fixing it

@csabella
Copy link
Contributor

csabella commented Jun 3, 2017

Hi @leodema - @rhettinger commented on the bpo on 5/25 to request additional changes, please take a look when you get a chance. Thanks!

@leodema
Copy link
Contributor Author

leodema commented Jun 3, 2017

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.

@csabella
Copy link
Contributor

csabella commented Jun 3, 2017

@leodema I apologize. I didn't see that earlier comment. You can ignore what I said earlier.

@mdickinson
Copy link
Member

Let's merge this. It's an obvious fix that's mathematically correct and that Raymond has already approved in the issue discussion.

@mdickinson mdickinson merged commit 9f396b6 into python:master Jun 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants