[SciPy-Dev] vectorized scipy.integrate.quad
Pauli Virtanen
pav at iki.fi
Wed Sep 30 12:27:03 EDT 2015
Christoph Groth <christoph <at> grothesque.org> writes:
[clip]
> On the Python level, I think that the interface to the new function
> could remain the same as that of the existing quad routine, with the
> only difference that the first argument of the integrand will be not a
> number, but a 1d-array of numbers.
>
> Would such a vectorized quad be a welcome addition to SciPy? I imagine
> proceeding as follows:
This sounds like a very reasonable addition to me.
Some suggestions:
- The other possible API would be to add a vectorized=False
keyword argument, controlling whether vectorized evaluations
are done or not.
I think I would prefer this option, as it would result
to less duplication.
- I would somewhat prefer working with the original QUADPACK
F77 code, rather than f2c'ing it and then modifying, unless it
is necessary to replace everything.
As far as I see, this might be possible to do by just replacing
the DQK* routines.
- While at it, it would be useful to make it possible to pass
a void* pointer to the callable function, so that we could
drop the messy code dealing with enabling reentrancy.
--
Pauli Virtanen
More information about the SciPy-Dev
mailing list