So, I have this code. How to get the index of the minimum list value
import numpy as np
dict1={"num1":(9,6,6,9),"num2":(9,9,6,6)}
testnum=(10,5,5,10)
listdict= list(map(lambda x:x, dict1.values()))
result = np.array(listdict)-np.array(testnum)
print("result:",result)
print("len :",len(result))
print:
result: [[-1 1 1 -1]
[-1 4 1 -4]]
len: 2
By just viewing it, I can point that index 0 of result has the minimum value. How to get the index position? Any idea on this?
target:
min [[-1 1 1 -1]
index 0