numpy数组水平方向拼接和在尾部拼接
numpy数组拼接np.concatenate
a = np.array([[1,2,3]])
b = np.array([[4,5,6]])
c = np.array([[7,8,9]])
1. 尾部拼接
np.concatenate((a,b,c))
"""
array([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]])
"""
2. 水平方向拼接
np.concatenate((a,b,c),axis=1)
"""
array([[1, 2, 3, 4, 5, 6, 7, 8, 9]])
"""
知乎 https://www.zhihu.com/people/yuanmuou/activities