[Cython] Fwd: [BUG] Cython failing performance when Numpy is not installed

Alex S. alex0player at gmail.com
Wed Jul 15 13:51:03 CEST 2015


Hello,
being unable to acquire the Trac account (Robert Bradshaw's email is not
listed on his site), I write here.
The issue was described here: http://trac.cython.org/ticket/847 but was,
however, misidentified. The wrapper for a function which receives "fused
slice" (D[:]) arguments automatically includes the following code:
>                 cdef type ndarray
>                 try:
>                     import numpy
>                     ndarray = numpy.ndarray
>                 except (ImportError, AttributeError, TypeError):
>                     ndarray = None
(Compiler/FusedNode.py:468).
When numpy is not installed, each import tries to search for it in the
system path. (When it is, it's just cached). This severely degrades the
performance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20150715/97da7366/attachment.html>


More information about the cython-devel mailing list