class_docstr: EXPERIMENTAL 1d-solver generating pairs of approximative root and error.
  
  Uses Newton's method modified to use Steffensens method when convergence is
  slow. (I.e. for multiple roots.)
class_docstr_tok: ["EXPERIMENTAL","1d-solver","generating","pairs","of","approximative","root","and","error",".","Uses","Newton","'s","method","modified","to","use","Steffensens","method","when","convergence","is","slow",".","(","I.e",".","for","multiple","roots",".",")"]
code: def __init__(self, ctx, f, x0, **kwargs):
      self.ctx = ctx
      if not len(x0) == 1:
          raise ValueError(
              "expected 1 starting point, got %i" % len(x0)
          )
      self.x0 = x0[0]
      self.f = f
      if not "df" in kwargs:
  
          def df(x):
              return self.ctx.diff(f, x)
  
      else:
          df = kwargs["df"]
      self.df = df
  
      def phi(x):
          return x - f(x) / df(x)
  
      self.phi = phi
      self.verbose = kwargs["verbose"]
  
imports: from __future__ import print_function
  from copy import copy
  from ..libmp.backend import xrange
label_desc: Use image node_id 1 to create a new ANewton object  with example: obj = ANewton(ctx, f, x0)