Re: [Numpy-discussion] f2py and C functions/subroutines/structs

2007-05-24 Thread lorenzo bolla
I tried to write my own prova2.pyf and this is it: !-*- f90 -*- ! Note: the context of this file is case sensitive. python module prova interface function incr(x) real, dimension(2), intent(c) :: incr real, dimensi

Re: [Numpy-discussion] f2py and C functions/subroutines/structs

2007-05-24 Thread Pierre GM
Lorenzo, you can indeed use f2py to write extensions around some C code: http://cens.ioc.ee/projects/f2py2e/usersguide/index.html http://www.scipy.org/Cookbook/f2py_and_NumPy I think you should also be able to find some actual examples in the scipy sources...

Re: [Numpy-discussion] f2py and C functions/subroutines/structs

2007-05-24 Thread Gael Varoquaux
On Thu, May 24, 2007 at 03:50:40PM +0200, Gael Varoquaux wrote: > On Thu, May 24, 2007 at 03:40:18PM +0200, lorenzo bolla wrote: > >I hope this is the right mailing list to post my question to. > >I'm trying to make some easy C code working with Python by using f2py. > I can't help too muc

Re: [Numpy-discussion] f2py and C functions/subroutines/structs

2007-05-24 Thread Gael Varoquaux
On Thu, May 24, 2007 at 03:40:18PM +0200, lorenzo bolla wrote: >I hope this is the right mailing list to post my question to. >I'm trying to make some easy C code working with Python by using f2py. I can't help too much on that as I gave up using f2Py to wrap C a while ago, but I think you

[Numpy-discussion] f2py and C functions/subroutines/structs

2007-05-24 Thread lorenzo bolla
Hi all, I hope this is the right mailing list to post my question to. I'm trying to make some easy C code working with Python by using f2py. For example, take the test.c file: -- typedef struct data { int a; double b; } DATA; /*function with struct*/ DAT