[SciPy-user] Swig and Numpy arrays
Thu Jan 8 04:47:52 CST 2009
In fact numpy typemaps extract the size of the array, so if I
understand correctly, this is what you don't want. So you only have to
delete this part of the typemap.
Be aware that you will not have any size checks anymore, but you still
could extract the size, compare it with your memorized size.
2009/1/8 Justin Bayer <email@example.com>:
> 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.
> SciPy-user mailing list
Information System Engineer, Ph.D.
Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92
More information about the SciPy-user