首页
mac
it
登录
6mi
u
盘
搜
搜 索
it
reshape中的-1的含义
reshape中的-1的含义
mac
2022-06-30
34
代码如下:
import numpy as np a= np.array([1, 2, 3, 4]) d = a.reshape((2,-1)) print(d) d = a.reshape((-1,1)) print(d)
上面代码有两个-1
分别是:
最大列数
最大行数
的意思
转载请注明原文地址: https://mac.8miu.com/read-58135.html
最新回复
(
0
)