In [1]:
import numpy as np
In [31]:
x = np.array([0,2,4,7,9.5,7.5,8,10,8.1])
np.argmax(x[np.where(abs(x)<=0.95*np.max(abs(x)))])
Out[31]:
In [32]:
x[4]
Out[32]:
In [ ]: