Re: numpy : argmin in multidimensional arrays

2006-07-06 Thread TG
thanks. unravel_index do the trick. Travis E. Oliphant wrote: > TG wrote: > > 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

Re: numpy : argmin in multidimensional arrays

2006-07-06 Thread Travis E. Oliphant
TG wrote: > 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, ra

numpy : argmin in multidimensional arrays

2006-07-06 Thread TG
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