我有 100 个二维列表 a0 到 a99,很容易将它们转换为数组(我已经验证过):
print(np.array(a0).shape) # (2,150)
print(np.array(a1).shape) # (5,150)
print(np.array(a2).shape) # (10, 150)
# the sizes of a0 to a99 vary from (1,150) to (10, 150) only
我想将这 100 个 3D 数组组合成一个 3D 数组,例如combine_array:
print(combined_array.shape) # (100,10,150)
print(combined_array[0].shape) # (2,150)
print(conbined_array[1].shape) # (5,150)
print(combined_array[2].shape) # (10,150)
我使用 Python 3.7。