[SciPy-user] ode/programming question

Trevis Crane t_crane@mrl.uiuc....
Mon Apr 30 12:38:51 CDT 2007

Hi all,


When using one of the ODE solvers, you can pass it a list of arguments.
These arguments are used in the function that defines the system of
linear equations that you're solving.  What if I want to modify an
argument every iteration and re-pass this modified argument to the
helper function in the next iteration? In Matlab (what I'm most familiar
with), this is easy to do, using "nested" functions, because they share
the same scope/namespace as the function they're nested in.  This is not
the case in Python, however, so I'm curious what the best way of doing
this would be.  I assume I define a global variable, but I'm wondering
if there's another, perhaps better, way of doing it.








Trevis Crane

Postdoctoral Research Assoc.

Department of Physics

University of Ilinois

1110 W. Green St.

Urbana, IL 61801


p: 217-244-8652

f: 217-244-2278

e: tcrane@uiuc.edu



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20070430/f95d34ce/attachment.html 

More information about the SciPy-user mailing list