Skip to content

bpo-30561: Sync-up expovariate() and gammavariate code#1934

Merged
rhettinger merged 6 commits into
python:masterfrom
leodema:fix-issue-30561
Dec 24, 2018
Merged

bpo-30561: Sync-up expovariate() and gammavariate code#1934
rhettinger merged 6 commits into
python:masterfrom
leodema:fix-issue-30561

Conversation

@leodema

@leodema leodema commented Jun 3, 2017

Copy link
Copy Markdown
Contributor

@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

I merged master in to resolve conflicts. The code change in random.py LGTM.

It looks as though this needs a corresponding change in a test that's checking for specific outputs.

Note that this change affects reproducibility, which is within the parameters of the promise given in the docs ("Most of the random module’s algorithms and seeding functions are subject to change across Python versions"), but we probably shouldn't break it gratuitously by backporting this change.

@leodema

leodema commented Jun 4, 2017

Copy link
Copy Markdown
Contributor Author

thanks @mdickinson for merging, sorry yesterday was late night and I went to sleep, I am now working on fixing the test. I agree that backporting it will cause a lot of problems.

@leodema

leodema commented Jun 8, 2017

Copy link
Copy Markdown
Contributor Author

Hi @mdickinson I fixed the test, as I was there I've split it in three different tests and I've added a test to check if the result of gammavariate with alpha=1 is equal to expovariate(1/beta)

@leodema

leodema commented Jun 13, 2017

Copy link
Copy Markdown
Contributor Author

Hi @rhettinger Here I've implemented what you propose for gammavariate and fixed some tests

@rhettinger
rhettinger merged commit 63d1522 into python:master Dec 24, 2018
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.

7 participants