[Numpy-discussion] numpy and cython in pure python mode
Tue Sep 22 14:34:35 CDT 2009
On Tue, Sep 22, 2009 at 01:33, Sebastian Haase <firstname.lastname@example.org> wrote:
> I'm not subscribed to the cython list - hoping enough people would
> care to justify my post here:
> I know that cython's numpy is still getting better and better over
> time, but is it already today possible to have numpy support when
> using Cython in "pure python" mode?
> I like the idea of being able to develop and debug code "the python
> way" -- and then just switching on the cython-overdrive mode.
> (Otherwise I have very good experience using C/C++ with appropriate
> typemaps, and I don't mind the C syntax)
> I only recently learned about the "pure python" mode on the sympy list
> (and at the EuroScipy2009 workshop).
> My understanding is that Cython's pure Python mode could be "played"
> in two ways:
> a) either not having a .pyx-file at all and putting everything into a
> py-file (using the "import cython" stuff)
> or b) putting only cython specific declaration in to a pyx file having
> the same basename as the py-file next to it.
I'm pretty sure that you need Cython syntax that is not supported by
the pure-Python mode in order to use numpy arrays effectively.
> One more: there is no way on reload cython-modules (yet), right ?
Correct. There is no way to reload any extension module.
"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 NumPy-Discussion