[SciPy-user] Swig and Numpy arrays

Justin Bayer bayer.justin@googlemail....
Thu Jan 8 04:40:48 CST 2009

Hi group,

I am currently trying to connect a C++ library of mine via SWIG to
Python/Scipy. I have several classes that have methods which expect a
double* as an argument of which the length is known by the object.

So what I want to do is to connect a method with the signature
(double* array) to a Numpy array. I had a look at numpy.i and its
typemaps, but it seems that only typemaps are supplied which also deal
with such bound checking behaviour in the signature. As I said, the
bounds are held in a field of the object.

What is the best way to get around this? I am fairly new to swig and
wanted to know if somebody else has already encountered this problem.


More information about the SciPy-user mailing list