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

Skip to content

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