python - Numpy argmax. How to compute both max and argmax? -
Is there a way to get maximum and ArgMax by a stroke?
Import NP A = [0,0,1,0] Max = Max (A) Index = N.P. Reg. (A)
What The fastest way to do this is by doing something:
[max, index] = function (a)
It may be that something like this is ...
index = np.argmax (A) maximum = one (index )
Comments
Post a Comment