Numpy minimum in (row, column) format

Use unravel_index:

numpy.unravel_index(A.argmin(), A.shape)

Leave a Comment