[Numpy-discussion] flatindex

Tobias Knopp tobias at knoppweb.de
Sun May 20 05:27:18 EDT 2007


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 how to write such a procedure but was
curious if one exists in numpy.

Thanks for response and the really impressive software package.

Tobi




More information about the NumPy-Discussion mailing list