class_docstr: 1d-solver generating pairs of approximative root and error.
  
  Needs starting points x0 and x1 close to the root.
  x1 defaults to x0 + 0.25.
  
  Pro:
  
  * converges fast
  
  Contra:
  
  * converges slowly for multiple roots
class_docstr_tok: ["1d-solver","generating","pairs","of","approximative","root","and","error",".","Needs","starting","points","x0","and","x1","close","to","the","root",".","x1","defaults","to","x0","+","0.25",".","Pro",":","*","converges","fast","Contra",":","*","converges","slowly","for","multiple","roots"]
code: def __init__(self, ctx, f, x0, **kwargs):
      self.ctx = ctx
      if len(x0) == 1:
          self.x0 = x0[0]
          self.x1 = self.x0 + 0.25
      elif len(x0) == 2:
          self.x0 = x0[0]
          self.x1 = x0[1]
      else:
          raise ValueError(
              "expected 1 or 2 starting points, got %i" % len(x0)
          )
      self.f = f
  
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 Secant object  with example: obj = Secant(ctx, f, x0)