8000 ENH: Add multidimensional array support to numpy.random.choice by masasin · Pull Request #7810 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: Add multidimensional array support to numpy.random.choice #7810

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

Closed
wants to merge 1 commit into from

Conversation

masasin
Copy link
@masasin masasin commented Jul 7, 2016

Backwards compatible by adding an axis keyword to the end of the
signature for choice. Default is 0, which selects by row. The default
keyword arguments make it functionally equivalent to random.choice from
Python's standard library. Note, however, that a list of tuples will
have the tuples returned as lists.

Issue #2724 was originally opened with that request, but #2727 seems to
have closed it accidentally.

Backwards compatible by adding an `axis` keyword to the end of the
signature for choice. Default is 0, which selects by row. The default
keyword arguments make it functionally equivalent to random.choice from
Python's standard library. Note, however, that a list of tuples will
have the tuples returned as lists.

Issue numpy#2724 was originally opened with that request, but numpy#2727 seems to
have closed it accidentally.
@dniku
Copy link
dniku commented Nov 12, 2018

Any movement on this?

bashtage added a commit to bashtage/randomgen that referenced this pull request Apr 12, 2019
bashtage added a commit to bashtage/randomgen that referenced this pull request Apr 12, 2019
bashtage added a commit to bashtage/randomgen that referenced this pull request Apr 12, 2019
bashtage added a commit to bashtage/numpy that referenced this pull request Apr 13, 2019
Improve performance in all cases
Large improvement with size is small

xref numpy#5299
xref numpy#2764
xref numpy#9855
xref numpy#7810
mattip pushed a commit to mattip/numpy that referenced this pull request May 20, 2019
Improve performance in all cases
Large improvement with size is small

xref numpy#5299
xref numpy#2764
xref numpy#9855
xref numpy#7810
mattip pushed a commit to mattip/numpy that referenced this pull request May 20, 2019
Improve performance in all cases
Large improvement with size is small

xref numpy#5299
xref numpy#2764
xref numpy#9855
xref numpy#7810
@mattip
Copy link
Member
mattip commented May 29, 2019

Closing, np.random.Generator.choice now has an axis=0 kwarg

8000

@mattip mattip closed this May 29, 2019
@dniku
Copy link
dniku commented May 29, 2019

Great news! Which version should it be released with?

@mattip
Copy link
Member
mattip commented May 29, 2019

1.17 (the next major release), if we don't discover a problem and have to revert it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4897
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0