[SciPy-dev] Cython / python policy

Robert Cimrman cimrman3@ntc.zcu...
Mon Mar 9 04:12:37 CDT 2009

David Cournapeau wrote:
> On Sat, Mar 7, 2009 at 6:30 AM, Matthew Brett <matthew.brett@gmail.com> wrote:
>> Hi David, and team,
>> David, I've quoted you here on your response to an offer to submit
>> some code to your scikit, but as a jumping off point for further
>> discussion.
>>> There are only two big requirements:
>>>  - I do want a pure python implementation for everything (with
>>> optional C/Cython).
>> I was just thinking of doing some Cython.
>> Do we think that, in general, scipy code should have both C(ython)
>> _and_ python implementations of the same thing, with different names,
>> as for Anne's spatial package?
> I think we should have as much python code as possible. We have too
> much C/C++/Fortran code already, and this is order of magnitude harder
> to maintain than python. As long as the original writer is there, it
> is ok, but when he is not available anymore, it can become a problem.
> When you have semi working code in C (or worse fortran or C++),
> without documentation, it is almost guaranteed to become
> unmaintainable short of rewriting.
> Even cython has problems - only for it cannot support complex number
> or other features of numpy as well as python code. Having a pure
> python code is even more useful than test in my experience.

+1 to as much pure python code as possible. After all, scipy is not 
"scicy". IMHO only the real performance bottlenecks (i.e. after many 
people complain :)) should be considered worth cythonizing/C++-ing.


More information about the Scipy-dev mailing list