Re: [Numpy-discussion] a simple question about f2py

2007-10-24 Thread Lisandro Dalcin
Pauli, I finally understood your idea What a good hack!!! You have to pass an integer array with enough space in order Fortran con store there some extra metadata, no just the buffer pointer, but also dimensions and some other runtime stuff. Many, many, many thanks On 10/24/07, Pauli Vi

Re: [Numpy-discussion] a simple question about f2py

2007-10-24 Thread Lisandro Dalcin
On 10/24/07, Pauli Virtanen <[EMAIL PROTECTED]> wrote: >Using a hack like this, it's also possible to pass derived type object >pointers, "type(Typename), pointer", from the Python side to the >Fortran side, as opaque handles. Could you please send/point me an example of how I can actually pass F

Re: [Numpy-discussion] a simple question about f2py

2007-10-24 Thread Pauli Virtanen
Lisandro Dalcin <[EMAIL PROTECTED]> kirjoitti: > Im trying to use f2py to wrap some fortran functions wich receive as > argument PETSc objects. The usual way to implement this with > PETSc+fortran is to do something like this > > soubrutine matvec(A,x,y) > Mat A > Vec x > Vec y > end soubrutin

[Numpy-discussion] a simple question about f2py

2007-10-23 Thread Lisandro Dalcin
Im trying to use f2py to wrap some fortran functions wich receive as argument PETSc objects. The usual way to implement this with PETSc+fortran is to do something like this soubrutine matvec(A,x,y) Mat A Vec x Vec y end soubrutine The 'Mat' and 'Vec' types are actually integers of appropriate