31 May
2007
31 May
'07
12:05 p.m.
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 a multidimensional one. I know how to write such a procedure but was curious if one exists in numpy.
See numpy.unravel_index -Travis