Python中numpy数组的合并有很多方法,如
np.append()
np.concatenate()
np.stack()
np.hstack()
np.vstack()
np.dstack...水平组合
>>> np.hstack((a,b))
array([ 0, 1, 2, 0, 2, 4], [ 3, 4, 5, 6, 8, 10], [ 6, 7, 8, 12, 14, 16]) >>> np.concatenate...np.vstack((a,b))
array([ 0, 1, 2], [ 3, 4, 5], [ 6, 7, 8], [ 0, 2, 4], [ 6, 8, 10], [12, 14, 16]) >>> np.concatenate