I forgot you are using C++.
Yes, all my code is in C++, and in fact the code I use in Python should be object-oriented as well, that's why it is not that easy to define how I'm going to do this... Using C++ with ctypes makes the wrapping
more difficult, I think, specially since you are using templates: you would have to write a C wrapper around your classes, and then using ctypes on the wrapper (there may be better ways, but I don't see an obvious one). Basically, using ctypes is like using code from a dynamically loaded library (ala VST :) ).
That works great for C then, not that well for C++... But writing some C code kills
one of the strong point of ctypes (doing all the wrapping in python).
Yes, but even with SWIG, I think I'll have to write wrapper in C or in SWIG to transform one array in my matrix and vice versa. Well, that should be a great example for my book ;) I have attached a simplistic example which show how to wrap some functions. Many thanks, it is simple, I only have to provide the wrappers :| and I have to do something with the class instance :| I'll think a little bit about how to do this properly and efficiently Matthieu
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion