I have two different arrays b0 and b1 where: b0=[1,2] b1=[3,4]
I want list[1st element of b0, 1st element of b1] to appended into new array B and similarly: list[2nd element of b0, 2nd element of b1] to appended into new array B and so on......
that is my new array should be something like: array([1,3],[2,4])
Below is my code:
b0=np.array([1,2])
b1=np.array([3,4])
for val in range(len(b1)):
L=[b0[val],b1[val]]
B=np.append(L,axis=0)
print(B)
I am getting missing on positional argument values error. Kindly help me to fix it.
numpy.append(arr, values, axis=None), so you need an arrayarr, the valuesvaluesyou want to append toarrand optionally theaxis.