Is there a python or numpy function that returns the argument or index of some value (or set of values) that exists in an iterable? I want something that is similar to the functionality of:
>>c= np.array([1,2,3])
>>np.argmin(c)
0
but is able to do:
>>c.*somefunction*(2)
1
In the pandas library, you can create a boolean mask that returns only the values that match the condition, and from there you can return the indices of these values. But how might this be done without pandas?