[SciPy-User] [SciPy-user] scipy: integration
Wed Feb 15 10:52:13 CST 2012
On Tue, Feb 14, 2012 at 10:25 AM, suzana8447 <email@example.com> wrote:
> Hello every body,
> I am a new user of scipy and I am facing some troubles of performing
> numerical integration.
> Suppose that we have a function called f(x,a,b) that we are going to
> integrate it from 0 to c.
> Note that a, b and c are some arrays.
> For example a=array([1., 0.5,3.]) , b=array([0.,1.,4.)] c=
> By this way, I would expect that the program returns an array whereby each
> value of the array represents the integral at each term of the arrays a,b
> and c.
None of the integrators for functions are vectorized. So this would
always need a loop.
For lower precision, the integrators using samples have an axis
argument if you build an array for different values of the parameters
a and b.
Only cumtrapz (or using ode) can integrate for different limits simultaneously.
Which version to use depends on your requirements.
> Thanks in advance.
> Best regards.
> View this message in context: http://old.nabble.com/scipy%3A-integration-tp33322670p33322670.html
> Sent from the Scipy-User mailing list archive at Nabble.com.
> SciPy-User mailing list
More information about the SciPy-User