I d like to perform a splice of sorts in NumPy. Let s say I have two arrays, a
and b
:
>>> a
array([[ 1, 10],
[ 2, 20],
[ 5, 30]])
>>> b
array([[ 1, 11],
[ 3, 31],
[ 4, 41]])
which I want to splice together into the following array, c
:
>>> c
array([[ 1., 10.],
[ 2., 20.],
[ 3., nan],
[ 4., nan],
[ 5., 30.]])
That is, I splice the values from the first column of b
into a
without bothering about the second column.
I could of course implement this myself pretty easily, but it would be nicer to have NumPy do it for me instead. Is that possible?