Re: [f2py] Pass a python array on a subroutine

Jürgen Wieferink <[email protected]> Mon, 2 Aug 2010 10:12:59 +0200
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>
Dear Audrey,

while the symptoms of the problem might be very simple, the problem
does not need to be.  At least it is not obvious to me after a quick
glance at your code.  Therefore, I need to dive deeper into it.  And
then, I stumble on code which I do not understand:

* Where are q and r defined?  [Is this code compilable at all?]
* What do you need ecriproj() for?  Should I really try to
  understand what is going on there?

Additionally, it is important how you actually call executable().
Here it is crucial to know the exact Python types, and that's
nontrivial, especially if there are more than one "from
<non-std-lib> import *" around.

Juergen

Audrey Hureau wrote (Monday 02 August 2010 09:51:17):
> The problem is pretty simple because I explained my goal :
> I want to pass an array on a subroutine.
> The array is Proj and I pass it on (and its size) with the python line:
> "execute (Proj, dim1, dim2)"
> 
> and then the subroutine could be : http://pastebin.com/d846QwZi
> 
> The values which are printed in the subroutine "executable" are all nulls
>  and should not be.
> 
> Is this better for helping the readers to understand my problem?
> 
> Audrey