--Use np.argmin (max)
import numpy as np
a = np.array([1,2,3,4,4])
np.argmin(a)
>>> 0
np.argmax(a)
>>> 3
If they overlap, the smaller one is adopted.
--Use np.where (conditional statement)
import numpy as np
a = np.array([1,2,3,4,4])
print np.where(a>2)
>>>(array([2, 3, 4]),)
http://oppython.hatenablog.com/entry/2016/05/31/205746