[SciPy-dev] cython in scipy?

Robert Kern robert.kern@gmail....
Thu Oct 9 03:36:55 CDT 2008


On Thu, Oct 9, 2008 at 03:26, Anne Archibald <peridot.faceted@gmail.com> wrote:
> 2008/10/9 Robert Kern <robert.kern@gmail.com>:
>> On Thu, Oct 9, 2008 at 03:06, Robin <robince@gmail.com> wrote:
>>> On Thu, Oct 9, 2008 at 9:02 AM, Robert Kern <robert.kern@gmail.com> wrote:
>>>> On Thu, Oct 9, 2008 at 02:58, Robin <robince@gmail.com> wrote:
>>>>> It might be as simple as changing Pyrex to Cython in the import.
>>>>
>>>> Not really. This isn't a standalone package where we can do things like that.
>>>
>>> Sorry - I meant in Anne's non-working example that Fernando originally
>>> gave, the fix to get it working might be as simple as changing "from
>>> Pyrex.Distutils" to "from Cython.Distutils"...
>>>
>>> Not sure what you think I meant... :)
>>
>> I thought you were talking about Anne's actual problem, which is using
>> Cython inside scipy.stats. The errors referring to Pyrex come from
>> inside numpy.distutils, which already has code to handle .pyx files as
>> Pyrex, not Cython files. Even if you fix the example, the actual
>> problem isn't solvable like that.
>
> This was the conclusion I drew (having tried substituting Cython in
> the import), and why I gave up. What would be involved in fixing
> numpy.distutils to resolve this problem? I realize that it will be
> awkward because cython and pyrex use the same extension but are not
> compatible.

We could extend the API somehow. Configuration.add_cython_extension()
or something like that.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco


More information about the Scipy-dev mailing list