Re: [Numpy-discussion] flatindex

2007-06-03 Thread Stefan van der Walt
Hi Tobias On Thu, Jan 08, 2004 at 08:35:07PM +0100, Tobias Knopp wrote: Sorry I'm only answering now, but your mail took 3.5 years to arrive ;) > I was looking for a method to find the indices of the smallest element > of an 3-dimensional array a. Therefore i used > > a.arg

Re: [Numpy-discussion] flatindex

2007-05-31 Thread Travis Oliphant
Glen W. Mabey wrote: >On Thu, May 31, 2007 at 11:05:52AM -0600, Travis Oliphant wrote: > > >>Tobias Knopp wrote: >> >> >> >>>Hi! >>> >>>I was looking for a method to find the indices of the smallest element >>>of an 3-dimensional array a. Therefore i used >>> >>>a.argmax() >>> >>>The problem

Re: [Numpy-discussion] flatindex

2007-05-31 Thread Glen W. Mabey
On Thu, May 31, 2007 at 11:05:52AM -0600, Travis Oliphant wrote: > Tobias Knopp wrote: > > >Hi! > > > >I was looking for a method to find the indices of the smallest element > >of an 3-dimensional array a. Therefore i used > > > >a.argmax() > > > >The problem was, that argmax gives me a flat index

Re: [Numpy-discussion] flatindex

2007-05-31 Thread Travis Oliphant
Tobias Knopp wrote: >Hi! > >I was looking for a method to find the indices of the smallest element >of an 3-dimensional array a. Therefore i used > >a.argmax() > >The problem was, that argmax gives me a flat index. My question is, if >there is a build-in function to convert the flat index back to

[Numpy-discussion] flatindex

2007-05-31 Thread Tobias Knopp
Hi! I was looking for a method to find the indices of the smallest element of an 3-dimensional array a. Therefore i used a.argmax() The problem was, that argmax gives me a flat index. My question is, if there is a build-in function to convert the flat index back to a multidimensional one. I know