SyntaxFix
Write A Post
Hire A Developer
Questions
>>> import numpy as np >>> a = np.array([[1,2,3],[4,3,1]]) >>> i,j = np.unravel_index(a.argmax(), a.shape) >>> a[i,j] 4