Skip to content

Commit a3a4769

Browse files
committed
DOC: clarify np.searchsorted documentation and add example for sorter
1 parent a4d7e43 commit a3a4769

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy/_core/fromnumeric.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1540,7 +1540,7 @@ def searchsorted(a, v, side='left', sorter=None):
15401540
>>> a = np.array([40, 10, 20, 30])
15411541
>>> sorter = np.argsort(a)
15421542
>>> sorter
1543-
array([1, 2, 3, 0]) # Indices that would sort the array
1543+
array([1, 2, 3, 0]) # Indices that would sort the array 'a'
15441544
>>> np.searchsorted(a, 25, sorter=sorter)
15451545
2
15461546
>>> a[sorter[np.searchsorted(a, 25, sorter=sorter)]]

0 commit comments

Comments
 (0)