[SciPy-user] [f2py] hide ?
Thu Apr 26 09:10:53 CDT 2007
David Huard a écrit :
> Here are some things that could be wrong.
> 1. You declare a as intent(in, out), this means that a is modified in
> place, ie, the subroutine does not return a value.
> >>> essai.essai(a, b, KW, nx, ny, nz)
> will hence return none.
essai.essai(a, b, KW, nx, ny, nz) does return the right value because it
works fine ;-)
> 2. Declare the dimension explicitely in the cf2py comments
> cf2py integer dimension(nx,ny,nz), intent(in) :: b
I did it. Nothing changes.
And the PerformancePython does not mention this.
> 3. If you want to hide the shape integers, you need to tell it to.
> cf2py integer, intent(hide) :: nx=shape(b,0)
> cf2py integer, intent(hide) :: ny=shape(b,1)
> cf2py integer, intent(hide) :: nz=shape(b,2)
I'll see this later, when my sample code works fine ;-)
More information about the SciPy-user