不知道你的问题是否正确,这是我的尝试
import numpy as np
a = np.random.randint(10,size=(600,600)) # random 600X600 array
print('a shape & size : ',a.shape, a.size)
b = np.random.randint(10,size=(600,600)) # random 600X600 array
c = np.random.randint(10,size=(600,600)) # random 600X600 array
print('b shape & size : ',b.shape, b.size)
print('c shape & size : ',c.shape, c.size)
x = np.stack([a,b,c], axis = 2) # numpy.stack() https://numpy.org/doc/stable/reference/generated/numpy.vstack.html
print('a+b+c axis 2 stack shape & size : ',x.shape, x.size) # stacked on new axes = 2 (axes start at 0), 600X600X3 array
输出:
a shape & size : (600, 600) 360000
b shape & size : (600, 600) 360000
c shape & size : (600, 600) 360000
a+b+c axis 2 stack shape & size : (600, 600, 3) 1080000