I'm trying to append 2 2d numpy arrays
a = np.array([[1],
[2],
[3],
[4]])
b = np.array([[ 4, 5, 6],
[ 7, 8, 9],
[10, 11, 12]])
target is
c = ([[1],
[2],
[3],
[4],
[ 4, 5, 6],
[ 7, 8, 9],
[10, 11, 12]])
Tried np.concatenate((a,b),axis=0)
and np.concatenate((a,b),axis=1)
and get
ValueError: all the input array dimensions except for the concatenation axis must match exactly
and np.append(a,b)
But nothing seems to work. If I convert to list it gives me the result I want but seems inefficient
c = a.tolist() + b.tolist()
Is there a numpy way to do this?