-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
DOC: Add clarifications np.argpartition #26716
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -823,6 +823,8 @@ def partition(a, kth, axis=-1, kind='introselect', order=None): | |
the real parts except when they are equal, in which case the order | ||
is determined by the imaginary parts. | ||
|
||
The sort order of ``np.nan`` is bigger than ``np.inf``. | ||
|
||
Examples | ||
-------- | ||
>>> a = np.array([7, 1, 7, 7, 1, 5, 7, 2, 3, 2, 6, 2, 3, 0]) | ||
|
@@ -923,7 +925,7 @@ def argpartition(a, kth, axis=-1, kind='introselect', order=None): | |
is unstable, and hence the returned indices are not guaranteed | ||
to be the earliest/latest occurrence of the element. | ||
|
||
The treatment of ``np.nan`` in the input array is undefined. | ||
The sort order of ``np.nan`` is bigger than ``np.inf``. | ||
|
||
See `partition` for notes on the different selection algorithms. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand this comment. Aren't we in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The sort order is defined in the docstring for I've removed notes regarding the sort order from |
||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.