import numpy as np
test = np.array([1, 7, 4, 9, 2, 3, 6, 0, 8, 5])
rst = np.where(test > 7)[0]
print("rst:",rst)
rst: [3 8]
import numpy as np
test = np.array([1, 7, 4, 9, 2, 3, 6, 0, 8, 5])
rst = np.where(test > 7)[0]
print("rst:",rst)
rst: [3 8]