Assume I have a Python list:
x = [3,6,4,8,1,9]
and I want to find the index of the element in the list which is the minimum inside a sublist (say from index 2 to 4).
So I want to take a sublist x[2:5] and get the index of the minimum element (in this case x).
How to return index 4 in such a case? If I use np.argmin() on the sublist, it will return the index according to the sublist (in this case, np.argmin(x[2:5]) will return 2 which is correct according to the sublist).
I don't want to use multiple if-else conditions. How to go about getting this index in a short way?