Pytorch基础操作 numpy基础操作 定义数组(一维与多维) 寻找最大值 维度上升与维度下降 数组计算 矩阵reshape 矩阵维度转换 代码实现 import numpy as np a = np.array([1, 2, 3, 4, 5, 6]) # array数组 b = np.array([8, 7, 6, 5, 4, 3]) print(a.shape, b.shape) # shape为数组的格式 aa = np.reshape(a, (2, 3)) # reshape为格式转