I read the similar topic here. I think the question is different or at least .index() couldnot solve my problem.
.index()
This is a simple code in R and its answ
You could also use heapq to find the index of the smallest. Then you can chose to find multiple (for example index of the 2 smallest).
heapq
import heapq x = np.array([1,2,3,4,0,1,2,3,4,11]) heapq.nsmallest(2, (range(len(x))), x.take)
Returns [4, 0]
[4, 0]