I have two array's:
In [32]: a
Out[32]:
array([[1, 2, 3],
[2, 3, 4]])
In [33]: b
Out[33]:
array([[ 8, 9],
[ 9, 10]])
I would like to get the following:
In [35]: c
Out[35]:
array([[ 1, 2, 3, 8, 9],
[ 2, 3, 4, 9, 10]])
i.e. apped the first and second value of b[0] = array([8, 9])
as the last two values of a[0]
and append the first and second value of b[1] = array([9,10])
as the last two values of a[1]
.
The second answer in this link: How to add multiple extra columns to a NumPy array does not work and I do not understand the accepted answer.