Re: [Numpy-discussion] Global Numpy vector with Swig

2007-02-16 Thread Andrea Tomadin
Il giorno 15/feb/07, alle ore 22:26, Bill Spotz ha scritto: > It seems to me you would need to %ignore vec, so that it is not > wrapped as a raw pointer to a double, and then in your interface > file create a PyArrayObject whose data buffer points to vec (the > most efficient way to do this

[Numpy-discussion] Global Numpy vector with Swig

2007-02-15 Thread Andrea Tomadin
Hi, I need to pass a Numpy array to a C code wrapped by Swig. The array in the C code is a global variable declared as double *vec and I would like to set it in the calling Python module foo using e.g. foo.cvar.vec = numpy.zeros(10) so that the array is manipulated in place. I found out the exampl