I'm going to find the max value of each column and its index in a 2D numpy ndarray but I got the error
TypeError: cannot unpack non-iterable numpy.int64 object
here is my code
import numpy as np
a = np.array([[1,0,4,5,8,12,8],
[1,3,0,4,9,1,0],
[1,5,8,5,9,7,13],
[1,6,2,2,9,5,0],
[3,5,5,5,9,4,13],
[1,5,4,5,9,4,13],
[4,5,4,4,9,7,4]
])
x,y = np.argmax(a)
#x should be max of each column and y the index of it
does anybody know about it?