[Numpy-discussion] C++ Example

Luis Pedro Coelho lpc@cmu....
Sun Mar 4 16:18:40 CST 2012

On Saturday, March 03, 2012 04:38:53 PM David Cournapeau wrote:
> I don't think the code is comparable either - some of the stuff done
> in the C code is done in the C++ code your are calling. The C code
> could be significantly improved.

Actually, that's not 100% accurate. The C code calls the same functions. Most 
of the extra cruft is that it needs to do all of this error checking and type-
dispatch, while in C++ you can have RAII and templates.

> Even more important here: almost none
> of this code should be written anymore anyway, C++ or not. This is
> really the kind of code that should be done in cython, as it is mostly
> about wrapping C code into the python C API.

At least last time I read up on it, cython was not able to do multi-type code, 
i.e., have code that works on arrays of multiple types. Does it support it 

Luis Pedro Coelho | University of Lisbon | http://luispedro.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120304/90238296/attachment.bin 

More information about the NumPy-Discussion mailing list