Skip to content

bpo-30464: Fix comment in gammavariate#1798

Merged
mdickinson merged 1 commit into
python:masterfrom
leodema:fix-issue-46895
Jun 4, 2017
Merged

bpo-30464: Fix comment in gammavariate#1798
mdickinson merged 1 commit into
python:masterfrom
leodema:fix-issue-46895

Conversation

@leodema

@leodema leodema commented May 24, 2017

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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

leodema commented May 27, 2017

Copy link
Copy Markdown
Contributor Author

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

@csabella

csabella commented Jun 3, 2017

Copy link
Copy Markdown
Contributor

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

leodema commented Jun 3, 2017

Copy link
Copy Markdown
Contributor Author

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

csabella commented Jun 3, 2017

Copy link
Copy Markdown
Contributor

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

@mdickinson

Copy link
Copy Markdown
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