Re: [f2py] How to use module parameters in dimension()

Tim-DRS <[email protected]> Sun, 3 Jun 2012 12:07:52 -0500
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>
I did not use modules, just subroutines.  I recall my issue was that when I declare the variable in the subroutine, if the variable size varied, I had to pass that size variable as n to the subroutine as an integer.  My case was  declaring a variable such as A(m,n) and passing m & n as integer variables.  Note, A may have been for input, output, or in/out.

Not a big deal, but I had dozens of subroutines that required changing.  I recall attempting to use parameters that import from an include file, but that did not work either.

Thanks
Tim


Sent from my iPod

On Jun 3, 2012, at 3:43 AM, Paul Anton Letnes <[email protected]> wrote:

> What's wrong with n = size(variable)? Do you really _need_ n as a
> module variable?
> 
> Paul
> 
> 
> On Sun, Jun 3, 2012 at 2:43 AM, Tim-DRS <[email protected]> wrote:
>> I have had the same/similar problem.
>> I never found a solution, only a workaround to pass 'n' as a variable into the function.
>> 
>> I would like to see a solution if one exists.
>> 
>> Tim
>> 
>> 
> 
> _______________________________________________
> f2py-users mailing list
> f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
> http://cens.ioc.ee/mailman/listinfo/f2py-users