15169026698 发表于 2020-4-9 19:54:58

ndarry的reshape

b = np.array([(1.5,2,3),(4,5,6)],dtype = float)
b.reshape(3,-2)
请问大佬reshape(3,-2)怎么理解啊?

BngThea 发表于 2020-4-9 20:21:21

就是修改矩阵的行列
如果有一个数为负数,那么按照其他的值自动计算长度
页: [1]
查看完整版本: ndarry的reshape