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

Robin <[email protected]> Mon, 2 Aug 2010 09:34:15 +0100
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>
On Mon, Aug 2, 2010 at 9:10 AM, Audrey Hureau <[email protected]> wrote:
> In the subroutine "execute", I forgot to replace the variable r and q (in
> the loops DO) by b and a but it is not the problem.

I was not talking about the loops but about the declaration of the a
variable on line 3. I think it should use b and c.

Also does adding intent (in) help?

Otherwise I also think it would be helful also for you to make the
simplest example where  you have the problem... probably if you start
with a very simple the case the problem won't be there - then as you
add in detail you may see what the problem is.

Robin

> Audrey HUREAU
>
>
>
>
> ________________________________
> From: [email protected]
> To: f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
> Date: Mon, 2 Aug 2010 09:51:17 +0200
> Subject: Re: [f2py] Pass a python array on a subroutine
>
> 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
>
>
>
>
>> From: [email protected]
>> To: f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
>> Date: Mon, 2 Aug 2010 09:30:11 +0200
>> Subject: Re: [f2py] Pass a python array on a subroutine
>>
>> Dear Audrey,
>>
>> it would be very helpful for all the readers of the list to try hard
>> to make examples as short and terse as possible. Chances are higher
>> to get a usable answer if we do not have to struggle through mostly
>> unrelated code.
>>
>> Regards,
>> Juergen
>>
>>
>>
>>
>> Audrey Hureau wrote (Monday 02 August 2010 09:11:40):
>> > Hello everyone,
>> >
>> > I need your help because I try to pass a python array in a subroutine
>> > but
>> > the values I retrieve in my fortran subroutine are all null. I don't
>> > know
>> > why.
>> > Is anobody can tell me more about why I get this?
>> > Here is the python program : http://pastebin.com/MT8mLmaV. The
>> > subroutine
>> > is named "executable". The array's values are calculated with another
>> > python program called "projRot" and stocked in the "Proj" array. Here is
>> > the subroutine : http://pastebin.com/UExTzEhp.
>> >
>> > Audrey
>> >
>>
>> _______________________________________________
>> f2py-users mailing list
>> f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
>> http://cens.ioc.ee/mailman/listinfo/f2py-users
>
> _______________________________________________ f2py-users mailing list
> f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] http://cens.ioc.ee/mailman/listinfo/f2py-users
> _______________________________________________
> f2py-users mailing list
> f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
> http://cens.ioc.ee/mailman/listinfo/f2py-users
>
>