Concatenate two arrays Python Concatenate two arrays Python numpy numpy

Concatenate two arrays Python


The axis is incorrect:

>>> import numpy as np>>> A = np.ones((1,1,59))>>> B = np.zeros((1,56,59))>>> np.concatenate((A, B), axis=1)array([[[ 1.,  1.,  1., ...,  1.,  1.,  1.],        [ 0.,  0.,  0., ...,  0.,  0.,  0.],        [ 0.,  0.,  0., ...,  0.,  0.,  0.],        ...,         [ 0.,  0.,  0., ...,  0.,  0.,  0.],        [ 0.,  0.,  0., ...,  0.,  0.,  0.],        [ 0.,  0.,  0., ...,  0.,  0.,  0.]]])>>> _.shape(1, 57, 59)