You can use np.searchsorted to find the index where to cut it off.
The worst case for the current code is probably 1 element per each row, where the Python overhead will dominate.