[SciPy-Dev] merging optional Pythran support soon

Stanley Seibert sseibert at anaconda.com
Mon Dec 28 10:01:56 EST 2020


On Sat, Dec 26, 2020 at 3:33 PM Ralf Gommers <ralf.gommers at gmail.com> wrote:


> And to preempt the obvious question: no we don't need to compare with
> Numba. That situation didn't change from last time we discussed it; Numba
> is a heavy and fragile runtime dependency, and supporting libraries like
> SciPy isn't Numba's core focus. I also checked in with Stan Seibert (Numba
> core dev) recently, and he agreed with that assessment.
>

Just to jump in here, I would say that supporting SciPy, specifically,
isn't Numba's *current* core focus.  As one of the most core PyData
libraries (second only to NumPy), we agree that one needs to be very
conservative about introducing new code and new ways of doing things to
SciPy, and Numba's design approach makes it not a direct drop-in for Cython
use cases.  Pythran fits more naturally into a Cython usage pattern, which
is beneficial here.  Clearly Numba would need to have more robust
ahead-of-time compilation support to be usable in a library like SciPy, and
that is still on the back burner while we think about various issues.

However, other libraries that do numerical computing like SciPy (but do not
have the constraints of SciPy) *are* Numba's focus.  I just wanted to make
sure there was no confusion about this.  :)

As a meta comment, this PR is basically implementing a sort of dependency
injection for the SciPy internals, to allow a different compiler system to
be swapped in to compile a specific internal function.  Where this could be
generalized is very interesting, and relevant if there is a future where a
number of SciPy functions could be compiled by one of two compilers.  For
example, if the type information embedded in a comment for Pythran here:

https://github.com/scipy/scipy/pull/8306/files#diff-6e0de4105e10b6c609d5d18639757bc58716f165d14f677f5fcca8bf57edf805R6

were available at runtime and/or in a more readily parsible form, that
would be part of opening up SciPy to more compiler tools.  I'm not sure if
a best practice has emerged for writing Python type annotations with NumPy
types, though.  (None of these questions should hold up this PR, which I
have no opinion about as I'm not a SciPy maintainer.  :) )



> Please have a look at the PR and comment on it or here if there's
> something concerning.
>
> Cheers,
> Ralf
>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at python.org
> https://mail.python.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/scipy-dev/attachments/20201228/dbf85c18/attachment-0001.html>


More information about the SciPy-Dev mailing list