

def write_params(model, paramarr, name=None):
    ' write the parameters and values to a csv file\n    model: a model object\n    name: a string with the name for the file, or None to return the content\n    '
    if (name is not None):
        fobj = open(name, 'w')
    else:
        fobj = io.StringIO()
    for i in range(len(model.parameters)):
        fobj.write(('%s, %.17g\n' % (model.parameters[i].name, paramarr[i])))
    if (name is None):
        return fobj.getvalue()

dataset/ETHPy150Open pysb/pysb/pysb/util.py write_params/original