fix searchsorted for sorted segments of arrays
Merge pull request #7548 from tanmaykm/tanmaykm

fix searchsorted for sorted segments of arrays