numpy: what is the logic of the argmin() and argmax() functions?
By adding the axis argument, NumPy looks at the rows and columns individually. When it’s not given, the array a is flattened into a single 1D array. axis=0 means that the operation is performed down the columns of a 2D array a in turn. For example np.argmin(a, axis=0) returns the index of the minimum value … Read more