[Numpy-discussion] index of minimum of array
Bill Baxter
wbaxter at gmail.com
Fri Apr 13 15:57:29 EDT 2007
On 4/14/07, Alan Isaac <aisaac at american.edu> wrote:
> > On 4/13/07, Tommy Grav <tgrav at mac.com> wrote:
> >> 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.
>
>
> On Fri, 13 Apr 2007, Timothy Hochberg wrote:
> > argmin
>
> Just a reminder that there exist a very useful example list
> http://www.scipy.org/Numpy_Example_List#argmin
And in addition to examples it has great "See Also" info. I probably
use it more for the See Also than the actual examples. Sure enough
See Also for min() and max() refer to argmin() and argmax().
--bb
More information about the NumPy-Discussion
mailing list