np.shuffle
时间: 2023-08-27 11:20:16 浏览: 171
np.shuffle是NumPy库中的一个函数,用于对数组进行随机打乱的操作。与Python标准库中的random.shuffle()函数类似,np.shuffle()可以对一维数组进行乱序操作。但与random.shuffle()不同的是,np.shuffle()是专门针对NumPy数组的打乱函数。使用np.shuffle()函数可以将数组的元素随机重新排列,从而实现数组的乱序效果。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [python---np.shuffle](https://blog.csdn.net/zxyhhjs2017/article/details/80557962)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [np.random.shuffle ()对于多维数组沿任意一维进行顺序打乱](https://blog.csdn.net/Dr_maker/article/details/131104831)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文