I made a vector of constant values. The vector is (1 row, 6colums). Then, I call the vector in another function and I want to use each element of the vector for making other calcualtions. The problem is that I get the following error:
ValueError: could not broadcast input array from shape (6) into shape (1)
Why? Is there someone that can help me? Best regards,
n=6
F = np.ones([1,n])
F = F*0.4
# F: [[0.4 0.4 0.4 0.4 0.4 0.4]]
# Other function
str=np.zeros([1,n])
for i in range(0, len(F)):
str[i] = 1000 * F[i]
# ValueError: could not broadcast input array from shape (6) into shape (1)