Simplest way in my opinion:
RSS = np.random.randint(0, 99, size=(2, 3)) ij_min = np.unravel_index(RSS.argmin(), RSS.shape) # check result RSS Out[229]: array([[90, 97, 35], [75, 25, 32]]) ij_min Out[230]: (1, 1)