[Numpy-discussion] NumPy re-factoring project

David Cournapeau cournape at gmail.com
Thu Jun 10 18:49:35 EDT 2010


On Fri, Jun 11, 2010 at 7:25 AM, Sturla Molden <sturla at molden.no> wrote:
> Den 10.06.2010 22:07, skrev Travis Oliphant:
>>
>>> 2. The core should be a plain DLL, loadable with ctypes. (I know David Cournapeau and Robert Kern is going to hate this.) But if Python can have a custom loader for .pyd files, so can NumPy for it's core DLL. For ctypes we just need to specify a fully qualified path to the DLL, which can be read from a config file or whatever.

I am not sure why you say I would hate it - that's exactly what I
would like numpy core to be (a library). Ctypes is an implementation
detail. For reference counting, I am not sure we can get away with it
unless we use something like LUA stack technique for the core. The big
issue with reference counting is how to deal with non C VM - there has
to be known good practices to make libraries reusable from say the CLI
or the JVM, but I don't know them.

>
>
> By the way: Is Cython mature enough to toss all C out the door?

Maybe not all, but I am convinced most of it could. Today, I would not
have rewritten lfilter in C, for example, I would have just used
cython. One issue with cython compared to C is that it makes
compilation much slower altogether, at least with gcc. I have never
been able to pin-point the exact issue (it does not seem like gcc
should be that slow compiling the generated C).

David



More information about the NumPy-Discussion mailing list