np.stack

tech2024-11-23  15

a = np.array([1, 2, 3]) b = np.array([2, 3, 4]) a.shape (3,)

b.shape (3,)

np.stack((a, b), axis=0).shape (2, 3)

np.stack((a, b), axis=1).shape (3, 2)

最新回复(0)