'Run the solver.
Parameters
objfunc : callable
objection function
initval : iterable
initial guess for the parameter values
fargs : tuple
other arguments to be passed to the statistic function
kwargs : dict
other keyword arguments to be passed to the solver'

def __call__(self, objfunc, initval, fargs, **kwargs):

    if (u'maxiter' not in kwargs):
        kwargs[u'maxiter'] = self._maxiter
    if (u'acc' in kwargs):
        self._acc = kwargs[u'acc']
        kwargs.pop(u'acc')
    if (u'xtol' in kwargs):
        self._acc = kwargs[u'xtol']
        kwargs.pop(u'xtol')
    disp = kwargs.pop(u'verblevel', None)
    (fitparams, final_func_val, numiter, funcalls, exit_mode) = self.opt_method(objfunc, initval, args=fargs, xtol=self._acc, disp=disp, full_output=True, **kwargs)
    self.fit_info[u'final_func_val'] = final_func_val
    self.fit_info[u'numiter'] = numiter
    self.fit_info[u'exit_mode'] = exit_mode
    self.fit_info[u'num_function_calls'] = funcalls
    if (self.fit_info[u'exit_mode'] == 1):
        warnings.warn(u'The    fit    may    be    unsuccessful;    Maximum    number    of    function    evaluations    reached.', AstropyUserWarning)
    if (self.fit_info[u'exit_mode'] == 2):
        warnings.warn(u'The    fit    may    be    unsuccessful;    Maximum    number    of    iterations    reached.', AstropyUserWarning)
    return (fitparams, self.fit_info)
