Naive version of numpy.searchsorted(..., side='right')
(a, v)
| 212 | |
| 213 | |
| 214 | def searchsorted_right(a, v): |
| 215 | """ |
| 216 | Naive version of numpy.searchsorted(..., side='right') |
| 217 | """ |
| 218 | indices = np.flatnonzero(v < a) |
| 219 | if len(indices): |
| 220 | return indices.min() |
| 221 | else: # pragma: no cover |
| 222 | return len(a) |
| 223 | |
| 224 | |
| 225 | def stump( |