Skip to content
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

DOC: Add unravel_index examples to np.arg(min|max|sort) #9826

Merged
merged 2 commits into from
Oct 6, 2017

Conversation

charris
Copy link
Member

@charris charris commented Oct 5, 2017

Update of #9333.

Show how to retrieve indices for d-dim arrays.

[ci skip]
>>> ind = np.unravel_index(np.argsort(x, axis=None), x.shape)
>>> ind
(array([0, 1, 1, 0]), array([0, 0, 1, 1]))
>>> x[ind] #same as np.sort(x, axis=None)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add space after #

@charris
Copy link
Member Author

charris commented Oct 5, 2017

Done.

@eric-wieser eric-wieser merged commit 50e33f9 into numpy:master Oct 6, 2017
@charris charris deleted the gh-9333 branch October 6, 2017 14:34
@ElieGouzien
Copy link
Contributor

@charris Thanks a lot for finishing my work !

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

Successfully merging this pull request may close these issues.

None yet

4 participants