numpy : argmin in multidimensional arrays

TG girodt at gmail.com
Thu Jul 6 11:52:21 CEST 2006


Hi there.

I am working with multi-dimensional arrays and I need to get
coordinates of the min value in it.

using myarray.argmin() returns the index in the flatten array, which is
a first step, but I wonder if it is possible to get the coordinates
directly as an array, rather than calculating them myself by using this
flat index and the shape of the array.

well, in fact i'm not sure to understand how argmin(myarray) works,
when myarray is multidimensional.

Thanks




More information about the Python-list mailing list