def fixed_quad(func,a,b,args=(),n=<NUM_LIT:5>):
[x,w] = _cached_p_roots(n)<EOL>x = real(x)<EOL>ainf, binf = map(isinf,(a,b))<EOL>if ainf or binf:<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>y = (b-a)*(x+<NUM_LIT:1>)/<NUM_LIT> + a<EOL>return (b-a)/<NUM_LIT>*sum(w*func(y,*args),<NUM_LIT:0>), None<EOL>
Compute a definite integral using fixed-order Gaussian quadrature.

Integrate `func` from `a` to `b` using Gaussian quadrature of
order `n`.

Parameters
----------
func : callable
    A Python function or method to integrate (must accept vector inputs).
a : float
    Lower limit of integration.
b : float
    Upper limit of integration.
args : tuple, optional
    Extra arguments to pass to function, if any.
n : int, optional
    Order of quadrature integration. Default is 5.

Returns
-------
val : float
    Gaussian quadrature approximation to the integral

See Also
--------
quad : adaptive quadrature using QUADPACK
dblquad : double integrals
tplquad : triple integrals
romberg : adaptive Romberg quadrature
quadrature : adaptive Gaussian quadrature
romb : integrators for sampled data
simps : integrators for sampled data
cumtrapz : cumulative integration for sampled data
ode : ODE integrator
odeint : ODE integrator