If I have the following array:
a = [4, -5, 10, 4, 4, 4, 0, 4, 4]
To get the three minimum values index I do:
a1 = np.array(a)
print a1.argsort()[:3]
This outputs the following, which is ok:
[1 6 0]
The thing is that this includes that -5 (index 1).
How can I do this exact thing but ignoring the -5 of the array?
-5specifically, or negative numbers, or the second element ofa? What is your criterion exactly for excluding-5?-5as I told in the post. Thanks in advance.