Guest User

Untitled

a guest
Dec 13th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. searchsorted(arr, x, 'left') returns the position i such that arr[i-1] < x <= arr[i],
  2. so that i is the first one such that x <= arr[i]. Equivalent to lower_bound in c++
  3.  
  4. searchsorted(arr, x, 'right') returns the position i such that arr[i-1] <= x < arr[i],
  5. so that i is the first one such that x < arr[i]. Equivalent to upper_bound in c++
Add Comment
Please, Sign In to add comment