[SciPy-Dev] (no subject)

Nathan Woods charlesnwoods at gmail.com
Sun Jul 24 18:38:11 EDT 2016


Bump. 






On Wed, May 11, 2016 at 11:20 AM +0900, "Nathan Woods" <charlesnwoods at gmail.com> wrote:










There have been a number of problems (e.g. GitHub issues #5002, #4831) with the C interface of scipy.integrate.quad since work was done a couple of years ago to allow performance optimizations (https://github.com/scipy/scipy/commit/f5183a34a959d625c6b534e99df5db7ca49bf1ec). Specifically, the QuadPack Fortran library does not really accommodate multivariate integrand functions, which leads to all sorts of monkey business in the API to hide that multivariate-ness. This is further complicated by the fact that the QuadPack interface is one of the oldest parts of SciPy and uses the Python C API directly, which many (most?) of us are unfamiliar with. 
I'd really like to figure out some kind of "good" solution to this. I think that the requirements of the problem are fairly simple: connect the existing scipy.integrate.quad routine to the underlying Fortran code, while allowing users to use compiled function pointers as integrand functions, if they want to (and are willing to put in some effort). 
I guess that the question here is, what is the best way to go about this? Should we simply find a way to fix the existing interface code? Should we roll back the changes and disallow the use of function pointers in quad? Should we replace the existing API with something else, using Cython or f2py? Should we alter the QuadPack code itself (perhaps by adding a void* argument to the function) to make it more friendly to multivariate functions in general?
The current state of affairs bothers me, especially since I was involved in the PR that  caused the new problems, but I haven't been able to come up with a good way to fix things yet. I'd love to get some ideas and feedback on how this could be resolved.
Nathan Woods





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20160724/0529bd47/attachment.html>


More information about the SciPy-Dev mailing list