I have a NumPy array
import numpy as np
A = np.array([2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
I want to insert a new column to A to make it look like
A=[[1,2], [1,3], [1,4], [1,5], [1,6], [1,7], [1,8], [1,9], [1,10], [1,11]]
I tried using NumPy.insert(A,0,1,axis=1) but it gives following error:
AxisError: axis 1 is out of bounds for array of dimension 1
I can't find where I am doing wrong. Please help me rectify this and suggest any other method(s).
Ahas only 1 dimension?