import numpy as np
a1 = np.arange(0,8).reshape(4,2) print(a1)
[[0 1] [2 3] [4 5] [6 7]]
np.random.shuffle(a1) # 打乱数组a1 print(a1)
[[4 5] [2 3] [6 7] [0 1]]
欢迎分享,转载请注明来源:内存溢出
import numpy as np
a1 = np.arange(0,8).reshape(4,2) print(a1)
[[0 1] [2 3] [4 5] [6 7]]
np.random.shuffle(a1) # 打乱数组a1 print(a1)
[[4 5] [2 3] [6 7] [0 1]]
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)