romberg(function, a, b, args=(), tol=1.48e-08, rtol=1.48e-08, show=False, divmax=10, vec_func=False)
If show is 1, the triangular array of the intermediate results will be printed. If vec_func is True (default is False), then function is assumed to support vector arguments.
Extra arguments to pass to function. Each element of args will be passed as a single argument to func. Default is to pass no extra arguments.
The desired absolute and relative tolerances. Defaults are 1.48e-8.
Whether to print the results. Default is False.
Maximum order of extrapolation. Default is 10.
Whether func handles arrays as arguments (i.e., whether it is a "vector" function). Default is False.
Function to be integrated.
Lower limit of integration.
Upper limit of integration.
Result of the integration.
Romberg integration of a callable function or method.
cumulative_trapezoid
dblquad
fixed_quad
ode
odeint
quad
romb
simpson
tplquad
from scipy import integrate
from scipy.special import erf
import numpy as np
gaussian = lambda x: 1/np.sqrt(np.pi) * np.exp(-x**2)
result = integrate.romberg(gaussian, 0, 1, show=True)
print("%g %g" % (2*result, erf(1)))
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them