Reusing the functions

Our goal is to reuse load_data and dump_data, possibly with some operations on y in between:
from convert3 import load_data, dump_data

y, timestep = load_data('.convert_infile1')

from math import fabs
for name in y:  # run through keys in y
    maxabsy = max([fabs(yval) for yval in y[name]])
    print 'max abs(y[%s](t)) = %g' % (name, maxabsy)

dump_data(y, timestep)
Then we need to make a module convert3!

previousnexttable of contents