def __init__(self, func='<STR_LIT>', coef=(<NUM_LIT:1>, <NUM_LIT:1>)):
if func is '<STR_LIT>':<EOL><INDENT>print("<STR_LIT>")<EOL>print("<STR_LIT>"+str(coef))<EOL>if len(coef) is not <NUM_LIT:2>:<EOL><INDENT>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL>coef = (<NUM_LIT:1>,<NUM_LIT:1>)<EOL><DEDENT>def ff(coef,x):<EOL><INDENT>return coef[<NUM_LIT:0>]*x + coef[<NUM_LIT:1>]<EOL><DEDENT>self.__name__ = func<EOL><DEDENT>elif func is '<STR_LIT>':<EOL><INDENT>print("<STR_LIT>")<EOL>print("<STR_LIT>"+str(coef))<EOL>if len(coef) is not <NUM_LIT:3>:<EOL><INDENT>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL>coef = (<NUM_LIT:1>,<NUM_LIT:1>,<NUM_LIT:1>)<EOL><DEDENT>def ff(coef,x):<EOL><INDENT>return coef[<NUM_LIT:0>]*x**coef[<NUM_LIT:1>] + coef[<NUM_LIT:2>]<EOL><DEDENT>self.__name__ = func<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL>ff = func<EOL>self.__name__ = func.__name__<EOL><DEDENT>def fres(coef,y,ff,x):<EOL><INDENT>return y-ff(coef,x)<EOL><DEDENT>self.residual = fres<EOL>self.coef     = coef<EOL>self.func     = ff<EOL>
Parameters
----------
func : string or function, optional
    If func is a string, then it must be one of the two strings
    'linear' or 'powerlaw'. If func is not a string it must be
    a custom function.  The default is "linear".
coef : list, optional
    A guess for the list of coefficients.  For 'powerlaw' coef
    must have three entries.  For 'linear' coef must have two
    entries.  If you provide your own function, then provide as
    many coef entries as your function needs.  The default is
    (1, 1).