不重复采样
复制代码
1
2
3
4
5
6
7
8c = range(10) N = 30 index1 = random.sample(c, N) index2 = random.sample(c, N) print(index1) print(index2)
可重复采样:
复制代码
1
2
3
4import numpy as np choices = np.random.choice(c, size=30, replace=True) print(choices)
最后
以上就是优雅雨最近收集整理的关于python 重复采样,不重复采样的全部内容,更多相关python内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复