[Matrix-SIG] numpy interface

Christian Tismer tismer@appliedbiometrics.com
Tue, 20 Apr 1999 14:41:45 +0200

pascucci wrote:
> Hi,
> I am new in this list.
> I would like to access NumericPython arrays in my own  C/C++ library.
> Does anyone have a piece of SWIG interface that can be used at this end?

I don't believe that you need SWIG to call NumPy from C, since
NumPy's C API can be used like Python's C API.
Do you just want to use NumPy's functions from C, or
are you going to use Python scripting as well?
The latter would mean to turn your C lib into something
which can be called from Python, and this might make use 
of SWIG, perhaps.
But if you are looking for maximum speed, I'd avoid generated
interfaces and craft my own. Calling overhead can be
significant, if you need many short calls with low computation

ciao - chris

Christian Tismer             :^)   <mailto:tismer@appliedbiometrics.com>
Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
Kaiserin-Augusta-Allee 101   :    *Starship* http://starship.python.net
10553 Berlin                 :     PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
     we're tired of banana software - shipped green, ripens at home