方法一 sorted

import numpy as np
lis = np.array([1,5,4,3,7])
sorted_index = sorted(range(len(lis)), key=lambda k: lis[k])
lis = lis[sorted_index]

方法二 argsort

import numpy as np
lis = np.array([1,5,4,3,7])
sorted_index = np.argsort(lis)
lis = lis[sorted_index]