![]() | This is how we would like to write the Python code:
maxsteps = 10000; n = 2 y = zeros((n,maxsteps), order='Fortran') step = 0; time = 0.0 def run(nsteps): global step, time, y y, step, time = \ oscillator.timeloop2(y, step, time, nsteps) y1 = y[0,0:step+1] g.plot(Gnuplot.Data(t, y1, with='lines')) |