I have a numpy array of numbers, for example,
a = np.array([1, 3, 5, 6, 9, 10, 14, 15, 56])
I would like to find all the indexes of the
You can use np.clip() to achieve the same:
np.clip()
a = [1, 3, 5, 6, 9, 10, 14, 15, 56] np.clip(a,6,10)
However, it holds the values less than and greater than 6 and 10 respectively.