I have a numpy array:
import numpy as np
stm = np.array([[0,1],[1,5],[4,5],[3,6],[7,9]])
x = 3.5
I want to find list of indices where: stm[i][0]<= x <=stm[i][1]
and the result should be [1,3].
Is there any way to do this in numpy without having to loop through stm?