np.concatenate
1 | # 拼接2个数组 |
二维数组拼接
1 | grid = np.array([[1, 2, 3], |
https://docs.scipy.org/doc/numpy/reference/generated/numpy.concatenate.html
np.vstack
1 | x = np.array([1, 2, 3]) |
https://docs.scipy.org/doc/numpy/reference/generated/numpy.vstack.html
np.hstack
1 | # 水平栈数组 |
https://docs.scipy.org/doc/numpy/reference/generated/numpy.hstack.html
np.dstack
https://www.numpy.org/devdocs/reference/generated/numpy.dstack.html
沿着第三个维度拼接数组
1 | 1,2,3)) a = np.array(( |