[Numpy-discussion] incorporating C/C++ code (original) (raw)
Rob Hooft rob at hooft.net
Thu Jun 29 12:25:59 EDT 2006
- Previous message (by thread): [Numpy-discussion] incorporating C/C++ code
- Next message (by thread): [Numpy-discussion] incorporating C/C++ code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Joris De Ridder wrote:
Hi,
For heavy number crunching I would like to include C and/or C++ functions in my NumPy programs. They should have/give NumPy arrays as input/output. On http://www.scipy.org/TopicalSoftware I find several suggestions to wrap C/C++ code: SWIG, weave, Pyrex, Instant, ... but it's quite difficult for me to have an idea which one I can/should use. So, a few questions: Any suggestion for which package I should use? Does this heavily depend for which purpose I want to use it?
Wrapping C/C++ code is only necessary if the C/C++ code is pre-existing. I have thusfar only incorporated C code into Numeric python programs by writing the code natively as a python extension.
Any kind of wrapping will carry a penalty. If you write a python extension in C you have all the flexibility you need.
Rob Hooft
Rob W.W. Hooft || rob at hooft.net || http://www.hooft.net/people/rob/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEo/8XH7J/Cv8rb3QRAm40AJ0YoTy653HP0FWmRN4/zuTFruDwUwCfTgrV 4zfSl3GVT8mneL60zzr2zeY= =JQrM -----END PGP SIGNATURE-----
- Previous message (by thread): [Numpy-discussion] incorporating C/C++ code
- Next message (by thread): [Numpy-discussion] incorporating C/C++ code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]