[Numpy-discussion] maximum value and corresponding index

Dr. Phillip M. Feldman pfeldman@verizon....
Wed Aug 5 14:57:43 CDT 2009

With Python/NumPy, is there a way to get the maximum element of an array and
also the index of the element having that value, at a single shot?  (One can
do this in Matlab via a statement like the following:

[x_max,ndx]= max(x)
View this message in context: http://www.nabble.com/maximum-value-and-corresponding-index-tp24834930p24834930.html
Sent from the Numpy-discussion mailing list archive at Nabble.com.

More information about the NumPy-Discussion mailing list