[SciPy-User] Help - scipy.integrate
Wed Nov 10 08:41:37 CST 2010
On Wed, Nov 10, 2010 at 8:25 AM, Waléria Antunes David <
> Yeah, i'm considering omega_k = 0 ..yeah i implemented equation (12) :
> http://pastebin.com/SHTKcMNU ... line 47
'func' should not be creating and returning the list 'm'. 'func' should
return a single value--the value of the integrand. So you could try
changing line 45 from 'Dl = a*f' to 'return a*f'. Then your call to romberg
computes d_L, and you will need to compute mu with that value. If you are
going to generate a graph, you will also need a loop somewhere to compute
the integral for a sequence of values. Currently you are only computing the
integral with fixed limits (z=0 to z=1.5).
Also, if omega_k is 0.0, then the condition in line 14 will be False, and
lines 16-26 will not be executed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User