[Numpy-discussion] NumPy re-factoring project

Sturla Molden sturla@molden...
Fri Jun 11 08:47:44 CDT 2010

Den 11.06.2010 09:14, skrev Sebastien Binet:
> it of course depends on the granularity at which you wrap and use
> numpy-core but tight loops calling ctypes ain't gonna be pretty
> performance-wise.

Tight loops in Python are never pretty.

The purpose of vectorization with NumPy is to avoid tight Python loops.

> I really think using cython would be a better option.
> one'd get the python2<->  python3 transition for "free".

Perhaps. Cython has nice syntax for PEP 3118 buffers. But there are 
downsides to this:
- Cython is not C. We want the core to be a C library independent of Python.
- Cython depends on CPython.
- Compiling Cython generated C takes time.
- Linkage can be a PITA (I use 64-bit Python now, and import libraries 
for gcc are missing.)


More information about the NumPy-Discussion mailing list