我有一个多维数组,我想形状为(19381100,6)。一旦我将数组转换为numpy数组,我得到的形状就是(19381,)
Input: d.shape
Output: (19381,)
Input: d[0].shape
Output: (100,6)
Input: d[0][0].shape
Output: (6,)
Input: if any(i.shape != (100,6) for i in d):
print(True)
else:
print(False)
Output: False
我错过了什么?我试过使用
d.shape = (19381,100,6)
但是我得到一个“无法将19381大小的数组重塑为形状(19381100,6)
谢谢你
伊恩
出现这个问题是因为我创建numpy数组的方式。我想做些
一旦我把密码改成
形状输出与预期一致。你知道吗
相关问题 更多 >
编程相关推荐