【发布时间】:2022-06-13 15:19:59
【问题描述】:
我有一个 NUMPY ARRAY,我使用 ARRAY.reshape(1,50) 对其进行了整形,这意味着它只有 1 行和 50 列。但是当我输入 ARRAY.shape 时,输出是 (50, )。为什么呢?输出不会误导吗?因为对于具有 50 行和 1 列的数组,您会得到相同的输出。那么为什么形状明显不同的数组的输出相同呢? enter image description here enter image description here
【问题讨论】:
-
你能发布你的代码吗?
标签: python arrays numpy reshape shapes