[Numpy-discussion] return index of maximum value in an array easily?

Chao YUE chaoyuejoy@gmail....
Thu Jan 10 03:40:52 CST 2013


Dear all,

Are we going to consider returning the index of maximum value in an array
easily
without calling np.argmax and np.unravel_index consecutively?

I saw few posts in mailing archive and stackover flow on this, when I tried
to return
the index of maximum value of 2d array.

It seems that I am not the first to be confused by this.

http://stackoverflow.com/questions/11377028/getting-index-of-numpy-ndarray
http://old.nabble.com/maximum-value-and-corresponding-index-td24834930.html
http://stackoverflow.com/questions/5469286/how-to-get-the-index-of-a-maximum-element-in-a-numpy-array
http://stackoverflow.com/questions/4150542/determine-index-of-highest-value-in-pythons-numpy

cheers,

Chao
-- 
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20130110/7d6cc6d1/attachment.html 


More information about the NumPy-Discussion mailing list