8000 Backport2793 by certik · Pull Request #2820 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Backport2793 #2820

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

Merged
merged 6 commits into from
Dec 15, 2012
Merged

Backport2793 #2820

merged 6 commits into from
Dec 15, 2012

Conversation

certik
Copy link
Contributor
@certik certik commented Dec 14, 2012

Backport of #2793.

The size argument to random.choice should work like it does for all
other functions in random as well.
Random choice used np.unique to find new indices when replace
was False and p given. This is wrong since unique will sort the
indices. This solves the bug, but likely not ideal.
Thanks to @alan-isaac for pointing out the 0-d vs. scalar issue.
An random.random call from within mtrand was done by a call to
np.random.random instead of inside the class. This can possibly lead
to non-deterministic results after seeding.
@certik
Copy link
Contributor Author
certik commented 9BCF Dec 15, 2012

I am just waiting for tests to run. If they run, then I am merging it.

@certik certik mentioned this pull request Dec 15, 2012
certik added a commit that referenced this pull request Dec 15, 2012
@certik certik merged commit fa3f5a1 into numpy:maintenance/1.7.x Dec 15, 2012
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.

4 participants
0