Well, that's easy ;)
OK, I have to digg in for the transformations of numpy arrays, knowing that
I have other parameters. But for this, the Cookbook at scipy should help me
a lot.
Thanks for the help ;)
Matthieu
Ok, I have a simple working example. It is actually much easier than I
thought,
2007/4/20, Matthieu Brucher [EMAIL PROTECTED]:
Well, that's easy ;)
OK, I have to digg in for the transformations of numpy arrays, knowing
that I have other parameters. But for this, the Cookbook at scipy should
help me a lot.
Thanks for the help ;)
Matthieu
Some news, I finished the
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
You should give ctypes a try, I find it much better than swig most
of the time for wrapping. You can find some doc here:
http://www.scipy.org/Cookbook/Ctypes2
Basically, once you get your dll/so with a function foo(double *a,
int n), you can call it directly in numpy by passing
Matthieu Brucher wrote:
You should give ctypes a try, I find it much better than swig most
of the time for wrapping. You can find some doc here:
http://www.scipy.org/Cookbook/Ctypes2
Basically, once you get your dll/so with a function foo(double *a,
int n), you
On 4/19/07, Matthieu Brucher [EMAIL PROTECTED] wrote:
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...
Doing the wrapping in an object
This may be of no help at all but I see mentions of C++/Python/OO/SWIG
and it triggers me to mention something I heard about recently called
PyCXX:
http://cxx.sourceforge.net/
I /think/ the idea behind it is to basically make a C++ version of the
Python C API. You still do all the wrapping
Matthieu Brucher wrote:
Doing the wrapping in an object oriented way is difficult, and maybe
not that useful. This does not prevent the API exposed to python
to be
OO, of course.
I have some difficulties to do this in an automated way...
I'm trying now to make a derived