先贴参考链接: https://stackoverflow.com/questions/21494489/what-does-numpy-random-seed0-do numpy.random.seed(num):如果使用相同的num,则每次生成的随机数都相同. 1.无num参数 代码: import numpy as np for i in range(5): np.random.seed() perm = np.random.permutation(10) print(perm) 结果:…