🪴qql1's digital garden

Home

❯

笔记

❯

计算机知识

❯

python

❯

第三方库

❯

numPy

❯

reshape()

reshape()

2026年1月26日1分钟阅读

  • 电脑-PC-桌面端-计算机
  • 操作-交互-操控

实例:

df#一个3×4的矩阵
df.reshape(1,12)#重新排列矩阵元素,变成1×12的矩阵
df.reshape(-1,3)#重新排列矩阵元素,要求第二个维度种类为3,第一个维度种类随意,最终第一个维度的种类为12÷3=4

详解

Python的reshape的用法:reshape(1,-1)、reshape(-1,1) - 知乎


关系图谱

  • 实例:
  • 详解

反向链接

  • 矩阵操作

Created with Quartz v4.5.2 © 2026

  • GitHub
  • Discord Community