np.random.randint会重复吗
时间: 2023-10-22 20:24:15 浏览: 89
np.random.randint函数可以生成指定范围内的随机整数,并且可以允许重复。也就是说,生成的随机数可能会有重复的情况发生。根据引用中的代码示例,生成了519个在0-10范围内的可以重复的随机数。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [用random生成有范围可以重复的随机数和有范围不可以重复的随机数](https://blog.csdn.net/qq_38703529/article/details/129449615)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [np.random一系列(np.random.normal()、np.random.randint、np.random.randn、np.random.rand)](https://download.csdn.net/download/weixin_38733382/13745169)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文