[Numpy-discussion] creating/working NumPy-ndarrays in C++

srean srean.list@gmail....
Wed Apr 4 15:21:12 CDT 2012


>> I do not know much Cython, except for the fact that it is out there
>> and what it is supposed to do., but wouldnt Cython need a compiler too
>> ?
>
> Yes, but at build-time, not run time.

Ah! I see what you mean, or so I think. So the first time a weave
based code runs, it builds, stores the code on disk and then executes.
Whereas in Cython there is a clear separation of build vs execute. In
fairness, though, it shouldnt be difficult to pre-empt a build with
weave. But I imagine Cython has other advantages (and in my mind so
does weave in certain restricted areas)

Now I feel it will be great to marry the two, so that for the most
part Cython does not need to call into the numpy api for array based
operations but fall back on something weave like. May be sometime in
future ....

>> I imagine distributing Cython based code would incur similar amounts
>> of schlep.
>
> if you distribute source, yes, but if you at least have the option of
> distributing binaries. (and distutils does make that fairly easy, for
> some value of fairly)

Indeed.


More information about the NumPy-Discussion mailing list