numpy 中最新的版本已经删除了这个函数 np.stack,但是可以用其他函数代替:
stack() Join a sequence of arrays along a new axis.
hstack() Stack arrays in sequence horizontally (column wise).
dstack() Stack arrays in sequence depth wise (along third dimension).
concatenate() Join a sequence of arrays along an existing axis.
np.stack((a,b),axis = 2) ---------np.dstack((a,b))
np.stack((a,b),axis = 1) ---------np.hatack((a,b))
np.stack((a,b),axis = 0) ---------np.vatack((a,b))