I can not understand the output of argmax and argmin when use with the axis parameter. For example:
>>> a = np.array([[1,2
""" ....READ THE COMMENTS FOR CLARIFICATION....."""
import numpy as np
a = np.array([[1,2,4,7], [9,88,6,45], [9,76,3,4]])
"""np.argmax(a) will give index of max value in flatted array of given matrix """
>>np.arg(max)
5
"""np.argmax(a,axis=0) will return list of indexes of max value column-wise"""
>>print(np.argmax(a,axis=0))
[1,1,1,1]
"""np.argmax(a,axis=1) will return list of indexes of max value row-wise"""
>>print(np.argmax(a,axis=1))
[3,1,1]
"""np.argmin(a) will give index of min value in flatted array of given matrix """
>>np.arg(min)
0
"""np.argmin(a,axis=0) will return list of indexes of min value column-wise"""
>>print(np.argmin(a,axis=0))
[0,0,2,2]
"""np.argmin(a,axis=0) will return list of indexes of min value row-wise"""
>>print(np.argmin(a,axis=1))
[0,2,2]