np.flatten
时间: 2023-09-04 09:14:55 浏览: 125
Python中flatten( ),matrix.A用法说明
np.flatten是numpy库中的一个函数,它用于将多维数组展平成一维数组。在使用np.flatten函数时,可以省略参数或者指定参数'C'或'F',其中'C'表示以C语言的行优先顺序展平数组,'F'表示以Fortran语言的列优先顺序展平数组。对于二维数组来说,默认情况下,np.flatten是按行优先顺序展平数组的,即按照行的顺序将数组的元素依次放入一维数组中。 <span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [torch.flatten、np.flatten 详解](https://blog.csdn.net/qq_28949847/article/details/128568723)[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%"]
- *3* [numpy数组](https://download.csdn.net/download/weixin_38674883/13741656)[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 ]
阅读全文