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

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -