[Numpy-discussion] Indices of min/max element of an array?

Travis Oliphant oliphant at ee.byu.edu
Tue Dec 6 12:33:00 CST 2005


Christos Siopis wrote:

>On Tue, Dec 06, 2005 at 12:17:14PM -0500, Perry Greenfield wrote:
>
>  
>
>>Why not:
>>
>>ind = where(arr == arr.max())
>>
>>and use the first element of the index array(s)
>>    
>>
>
>
>Would it be safe to assume that the numarray definition of where() will be the one 
>propagated into scipy.core?
>  
>
Yes, it is already there.

-Travis





More information about the Numpy-discussion mailing list