I am trying to calculate bending on my beam, but I get error. I am new at coding so I have no idea what is wrong. If I put only integer or float is working, but when I insert array I get this error
def poves(x):
eta1 = a/L
eta2 = (a+b)/L
zeta = x/L
E = 210e3 #MPA
F1 = Ft_1
F2 = Ft_3
Iy = 50**4*np.pi/64 ##mm
if(0<=x<=a):
return F1 * L * zeta*(1-eta2)/(E*Iy)
elif(a<x<=L):
return F1 * L * eta2*(1-zeta)/(E*Iy)
else:
print(f'Nope')
ValueError Traceback (most recent call last)
<ipython-input-149-e30266137f00> in <module>
----> 1 poves(x)
<ipython-input-148-290878c57829> in poves(x)
7 F2 = Ft_3
8 Iy = 50**4*np.pi/64 ##mm
----> 9 if(0<=x<=a):
10 return F1 * L * zeta*(1-eta2)/(E*Iy)
11 elif(a<x<=L):
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()