[Numpy-discussion] How to call methods from a class with custom matrices parameters with numpy arrays ?

Matthieu Brucher matthieu.brucher at gmail.com
Thu Apr 19 03:52:15 EDT 2007


Hi,

I want to wrap some code I've done in the past with a custom array and pass
numpy arrays to it.
So I need to transform numpy arrays to my arrays at the construction of an
instance of my class, as well as each call to a method (pass by value).
Then, some method return by value an array I have to transform back in numpy
arrays. I imagine that such wrappers must be done in the .i file...
I'm still new to SWIG, even though I understand the easy wrapping, such
wrapping is a bit difficult for me at the moment. I do not understand for
instance the numpy.i wrappers, what they do, ... Is there a simpler doc
somewhere to explain this ? Or a simple SWIG tutorial and a Numpy interface
tutorial - Travis' book ? - ?

Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070419/d3eb69e9/attachment.html>


More information about the NumPy-Discussion mailing list