[SciPy-User] Help With Scipy: Integration pack, returning an array for an array input
Pauli Virtanen
pav at iki.fi
Wed Dec 15 05:47:03 EST 2010
Wed, 15 Dec 2010 01:14:47 -0500, Vick wrote:
[clip]
> I'd like to get the value of this integral over a range of t's. I don't
> really understand why it's doing this, and I'd like to avoid using a for
> loop.
There's no way to avoid a loop here. The integration algorithm is
adaptive and cannot cope with vector inputs.
You can do
F = numpy.vectorize(D)
but speedwise this will be more or less the same as a for loop.
--
Pauli Virtanen
More information about the SciPy-User
mailing list