I can not understand the output of argmax and argmin when use with the axis parameter. For example:
>>> a = np.array([[1,2
The axis in the argmax function argument, refers to the axis along which the array will be sliced.
In another word, np.argmin(a,axis=0) is effectively the same as np.apply_along_axis(np.argmin, 0, a), that is to find out the minimum location for these sliced vectors along the axis=0.
Therefore in your example, np.argmin(a, axis=0) is [0, 0, 2, 2] which corresponding to values of [1, 2, 3, 4] on respective columns