[Matrix-SIG] SWIG with recent NumPy
Johann Hibschman
johann@physics.berkeley.edu
13 Dec 1999 11:55:54 -0800
Hello,
I'm trying to use SWIG to automatically wrap some C routines and
return the results as NumPy arrays (converting from my own pet vector
structure.) I have typemaps that worked with old versions of NumPy,
but now I have had to insert a call to "import_array()" by hand in the
SWIG-generated C module in the module initialization section.
This means (AFAIK) that I have to hand-patch the C every time I run
SWIG. That's bad. Is there any way to get SWIG to insert the needed
"import_array()" call automatically? Also, are there standard NumPy
SWIG typemaps?
Lots of questions, as ususal. ;-)
--Johann
--
Johann Hibschman johann@physics.berkeley.edu