[Numpy-discussion] index of minimum of array
Timothy Hochberg
tim.hochberg@ieee....
Fri Apr 13 14:14:56 CDT 2007
On 4/13/07, Tommy Grav <tgrav@mac.com> wrote:
>
> Hi,
>
> how do I find the index of the minimum value of an numpy array?
>
> Example
> a = array([1.,2.,0.4,3.])
>
> I want the i=2 since a[i] = 0.4 is the smallest value in a.
argmin
Cheers
> Tommy
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
--
//=][=\\
tim.hochberg@ieee.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070413/6378fa9f/attachment-0001.html
More information about the Numpy-discussion
mailing list