Skip to content

Commit 72b943c

Browse files
committed
DOC: Add clarifications np.argpartition
1 parent 667e6e1 commit 72b943c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

numpy/_core/fromnumeric.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,13 @@ def argpartition(a, kth, axis=-1, kind='introselect', order=None):
918918
919919
Notes
920920
-----
921+
The returned indices are not guaranteed to be sorted according to
922+
the values. Furthermore, the default selection algorithm ``introselect``
923+
is unstable, and hence the returned indices are not guaranteed
924+
to be the earliest/latest occurrence of the element.
925+
926+
The treatment of ``np.nan`` in the input array is undefined.
927+
921928
See `partition` for notes on the different selection algorithms.
922929
923930
Examples

0 commit comments

Comments
 (0)