1

In numpy, say I have an n by m size matrix A, and I use numpy.argmax(A, axis=0) to get a size m array, with each element corresponding to the index of that particular column's max value.

What's the most elegant way to convert that array of indices into an array of corresponding values - i.e: the result I would have obtained if argmax returned the max values instead of the indices?

0 Answers0