np.array 转为 list
时间: 2023-09-19 14:09:17 浏览: 95
要将np.array转换为list,可以使用tolist()函数。例如,如果有一个名为a的np.array数组,可以使用a.tolist()将其转换为list类型。这样就可以将np.array转换为list。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [python linalg测试的使用 python测试使用例程提供linalg使用的代码,供参考](https://download.csdn.net/download/li171049/88226181)[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: 33.333333333333336%"]
- *2* [nparray和list的转换](https://blog.csdn.net/github_38575699/article/details/108109249)[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: 33.333333333333336%"]
- *3* [浅谈numpy中np.array()与np.asarray的区别以及.tolist](https://download.csdn.net/download/weixin_38571453/13711564)[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: 33.333333333333336%"]
[ .reference_list ]
阅读全文