Nathaniel Smith <n...@pobox.com> wrote:

> 3. Using Cython in the numpy core
> 
> The numpy core contains tons of complicated C code implementing
> elaborate operations like indexing, casting, ufunc dispatch, etc. It
> would be really nice if we could use Cython to write some of these
> things.

So the idea of having a NumPy as a pure C library in the core is abandoned?


>  However, there is a practical problem: Cython assumes that
> each .pyx file generates a single compiled module with its own
> Cython-defined API. Numpy, however, contains a large number of .c
> files which are all compiled together into a single module, with its
> own home-brewed system for defining the public API. And we can't
> rewrite the whole thing. So for this to be viable, we would need some
> way to compile a bunch of .c *and .pyx* files together into a single
> module, and allow the .c and .pyx files to call each other. 

Cython takes care of that already.

http://docs.cython.org/src/userguide/sharing_declarations.html#cimport

http://docs.cython.org/src/userguide/external_C_code.html#using-cython-declarations-from-c


Sturla

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to