We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The integral is like this:
I was thinking of using quad but is not supported. However, non-accelerated quad is very slow and I'm in need of optimice my script.
Do you know if this can be done by another scipy.integrate method by collection samples? If so, in which points would I need to collect samples?
I can accept a small error of 0.001 or less
The text was updated successfully, but these errors were encountered:
Are t1, d1, t2, d2 fixed parameters? If so, scipy.integrate.quad() seems to run pretty rapidly for the following example:
t1
d1
t2
d2
scipy.integrate.quad()
import functools import numpy as np import scipy.integrate as integrate import scipy.special as sp def modified_gaussian(x, t1, d1, t2, d2): sqrt2 = np.sqrt(2) return (np.exp(-x**2/2)*(0.5*sp.erf((t1-x)/(sqrt2*np.sqrt(d1**2+5.12)))*+0.5)*\ (0.5*sp.erf((t2-x)/(sqrt2*np.sqrt(d2**2+5.12)))+0.5))/(sqrt2*np.pi) t1 = 1 d1 = 1 t2 = 1 d2 = 1 f = functools.partial(modified_gaussian, t1=t1, d1=d1, t2=t2, d2=d2) print(integrate.quad(f, -np.inf, np.inf))
Sorry, something went wrong.
No branches or pull requests
The integral is like this:
I was thinking of using quad but is not supported. However, non-accelerated quad is very slow and I'm in need of optimice my script.
Do you know if this can be done by another scipy.integrate method by collection samples? If so, in which points would I need to collect samples?
I can accept a small error of 0.001 or less
The text was updated successfully, but these errors were encountered: