I have a numpy array as follows:
matrix = array([[0.],
[1.],
[2.],
[3.],
[4.]])
I have another array:
x = [0.05385944 0.05419472 0.05453447 0.05487901]
I would like to insert the second array into the first index of the first array such like:
matrix = array([[0. 0.05385944 0.05419472 0.05453447 0.05487901],
[1.],
[2.],
[3.],
[4.]])
I have tried
matrix = np.insert(matrix, 1, x),
but this is creating an array as such:
array([ 0. 0.05385944, 0.05419472, 0.05453447, 0.05487901, 1., 2., 3., 4.])