Back to Numerical Arrays (NumPy)
np.searchsorted
Find indices where elements should be inserted to maintain order.
Syntax
np.searchsorted(a, v, side?)
Description
Find indices where elements should be inserted to maintain order.
Parameters
| Name | Description |
|---|---|
| a | - Sorted 1D input array |
| v | - Values to insert |
| side(optional) | - 'left' or 'right' side to insert |
Returns
Promise<NDArray | number>