This seem to be a trivial question, yet I did not find the answer I am looking for. I have a 2D array say:
a = np.array([[1,3,5],[2,4,6]])
And another column
b = np.array([9,11])
bt = np.reshape(b, (2,1))
I would like to add/append the bt column at the zero column of array a. I tried using numpy.insert:
tt = np.insert(a,0,bt,axis=1)
But the result is:
array([[ 9, 11, 1, 3, 5],
[ 9, 11, 2, 4, 6]])
What I want is:
array([[ 9, 1, 3, 5],
[ 11, 2, 4, 6]])
What am I doing wrong?