I am trying to find the position of the maximum value in a specific column of a numpy array.
The code to set up my array is:
m=np.zeros((3,4),dtype=int)
for i in range (0,3):
m[0][i]=1;
m[1][1]=1
m[2][0]=1
m[2][1]=1
m[0][3]=2
m[2][3]=1
print(m)
(I know this is a silly way to set it up but this is part of a much larger program and needs to be set up in this way)
Using this code:
b=0
m_e_p=np.max(m[:,b])
print(m_e_p)
I get the answer 1 since 1 is the maximum value in column 0, but I need its position. How do I get this?