import numpy as np
tmp = list()
for i in range(0, 10):
a = np.random.random_integers(low=10, high=100, size=[123, 5]) # (123, 5)
tmp.append(a[np.newaxis, :])
res = np.concatenate(tmp, axis=0)
print(res.shape)
# (10, 123, 5)
numpy 将多个二维数组拼接成一个三维数组
最新推荐文章于 2023-09-04 17:41:12 发布