what is argmax n pyhton

Solutions on MaxInterview for what is argmax n pyhton by the best coders in the world

showing results for - "what is argmax n pyhton"
Lesly
25 Apr 2017
1import numpy as np    
2A = np.matrix([[1,2,3,33],[4,5,6,66],[7,8,9,99]])
3
4np.argmax(A)  # 11, which is the position of 99
5
6np.argmax(A[:,:])  # 11, which is the position of 99
7
8np.argmax(A[:1])  # 3, which is the position of 33
9
10np.argmax(A[:,2])  # 2, which is the position of 9
11
12np.argmax(A[1:,2])  # 1, which is the position of 9