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

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -