[Numpy-svn] [numpy/numpy] acf742: ENH: make random.choice size argument default to N...
GitHub
noreply at github.com
Sat Dec 15 16:19:44 EST 2012
Branch: refs/heads/maintenance/1.7.x
Home: https://github.com/numpy/numpy
Commit: acf7421128b9d974d5153759650b7aaee3c2efec
https://github.com/numpy/numpy/commit/acf7421128b9d974d5153759650b7aaee3c2efec
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2012-12-14 (Fri, 14 Dec 2012)
Changed paths:
M numpy/random/mtrand/mtrand.pyx
Log Message:
-----------
ENH: make random.choice size argument default to None and allow tuple
The size argument to random.choice should work like it does for all
other functions in random as well.
Commit: 6b523d65f862eabb5ae8d19266cfe085388d9f76
https://github.com/numpy/numpy/commit/6b523d65f862eabb5ae8d19266cfe085388d9f76
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2012-12-14 (Fri, 14 Dec 2012)
Changed paths:
M numpy/random/mtrand/mtrand.pyx
Log Message:
-----------
BUG: Do not sort new indices in random.choice.
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.
Commit: 959f790a6d7afb8ecf722c95f293b97032ea26b1
https://github.com/numpy/numpy/commit/959f790a6d7afb8ecf722c95f293b97032ea26b1
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2012-12-14 (Fri, 14 Dec 2012)
Changed paths:
M numpy/random/mtrand/mtrand.pyx
Log Message:
-----------
BUG: Fix various problems in the previous commits.
Thanks to @alan-isaac for pointing out the 0-d vs. scalar issue.
Commit: 4b0249f700cdec74986168b5724940aaa6113b69
https://github.com/numpy/numpy/commit/4b0249f700cdec74986168b5724940aaa6113b69
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2012-12-14 (Fri, 14 Dec 2012)
Changed paths:
M numpy/random/tests/test_random.py
Log Message:
-----------
TST: Add tests for new feature and fix in random.choice
Commit: d27ddeeb97f7309b8a238c0f5b6e9cbbc31b8c2a
https://github.com/numpy/numpy/commit/d27ddeeb97f7309b8a238c0f5b6e9cbbc31b8c2a
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2012-12-14 (Fri, 14 Dec 2012)
Changed paths:
M numpy/random/mtrand/mtrand.c
Log Message:
-----------
MAINT: Regenerate mtrand.c
Commit: eb77c8d75e304da6dd7861a02fd4158db812e8e8
https://github.com/numpy/numpy/commit/eb77c8d75e304da6dd7861a02fd4158db812e8e8
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2012-12-15 (Sat, 15 Dec 2012)
Changed paths:
M numpy/random/mtrand/mtrand.c
M numpy/random/mtrand/mtrand.pyx
M numpy/random/tests/test_regression.py
Log Message:
-----------
BUG: internal call fix in random.choice
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.
Commit: fa3f5a199b18abf7bbb3f0ec3345d5f5a07b0c4a
https://github.com/numpy/numpy/commit/fa3f5a199b18abf7bbb3f0ec3345d5f5a07b0c4a
Author: Ondřej Čertík <ondrej.certik at gmail.com>
Date: 2012-12-15 (Sat, 15 Dec 2012)
Changed paths:
M numpy/random/mtrand/mtrand.c
M numpy/random/mtrand/mtrand.pyx
M numpy/random/tests/test_random.py
M numpy/random/tests/test_regression.py
Log Message:
-----------
Merge pull request #2820 from certik/backport2793
Backport2793
Compare: https://github.com/numpy/numpy/compare/57bab9e5f35c...fa3f5a199b18
More information about the Numpy-svn
mailing list