ktl014
7/27/2017 - 10:10 PM

how to use numpy.argmax() - returns maximum value of array From https://docs.scipy.org/doc/numpy/reference/generated/numpy.argmax.html

how to use numpy.argmax() - returns maximum value of array

From https://docs.scipy.org/doc/numpy/reference/generated/numpy.argmax.html

>>> a = np.arange(6).reshape(2,3)
>>> a
array([[0, 1, 2],
       [3, 4, 5]])
>>> np.argmax(a)
5
>>> np.argmax(a, axis=0)
array([1, 1, 1])
>>> np.argmax(a, axis=1)
array([2, 2])