I used scipy.integrate to get the value of the Fresnel integrals, and I now wish to plot the Cornu spiral. However, when I attempt to create an array with the value of the integral for multiple inputs, I get the error mentioned in the title. I can't see how what I'm doing has anything to do with the Truth value mentioned in the error.
My code:
def COSINTEGRAND(x):
return math.cos((pi * x**2)/2)
def SININTEGRAND(x):
return math.sin((pi * x**2)/2)
def COSINTEGRAL(u):
return quad(COSINTEGRAND, 0, u)
def SININTEGRAL(u):
return quad(SININTEGRAND, 0, u)
a = np.linspace(-10,10,100)
b = COSINTEGRAL(a)
print (b)
Any explanation of the error or methods to fix this would be appreciated. I got the same error when trying to plot the spiral directly- it appears to refer to a part of the scipy.integrate code
dtypeof the arrays here? are these numpy arrays? if so callnp.cosetc