class_docstr: Find the root of a vector function numerically using Newton's method.
  
  f is a vector function representing a nonlinear equation system.
  
  x0 is the starting point close to the root.
  
  J is a function returning the Jacobian matrix for a point.
  
  Supports overdetermined systems.
  
  Use the 'norm' keyword to specify which norm to use. Defaults to max-norm.
  The function to calculate the Jacobian matrix can be given using the
  keyword 'J'. Otherwise it will be calculated numerically.
  
  Please note that this method converges only locally. Especially for high-
  dimensional systems it is not trivial to find a good starting point being
  close enough to the root.
  
  It is recommended to use a faster, low-precision solver from SciPy [1] or
  OpenOpt [2] to get an initial guess. Afterwards you can use this method for
  root-polishing to any precision.
  
  [1] http://scipy.org
  
  [2] http://openopt.org/Welcome
class_docstr_tok: ["Find","the","root","of","a","vector","function","numerically","using","Newton","'s","method",".","f","is","a","vector","function","representing","a","nonlinear","equation","system",".","x0","is","the","starting","point","close","to","the","root",".","J","is","a","function","returning","the","Jacobian","matrix","for","a","point",".","Supports","overdetermined","systems",".","Use","the","'norm","'","keyword","to","specify","which","norm","to","use",".","Defaults","to","max-norm",".","The","function","to","calculate","the","Jacobian","matrix","can","be","given","using","the","keyword","'","J","'",".","Otherwise","it","will","be","calculated","numerically",".","Please","note","that","this","method","converges","only","locally",".","Especially","for","high-","dimensional","systems","it","is","not","trivial","to","find","a","good","starting","point","being","close","enough","to","the","root",".","It","is","recommended","to","use","a","faster",",","low-precision","solver","from","SciPy","[","1","]","or","OpenOpt","[","2","]","to","get","an","initial","guess",".","Afterwards","you","can","use","this","method","for","root-polishing","to","any","precision",".","[","1","]","http",":","\/\/scipy.org","[","2","]","http",":","\/\/openopt.org\/Welcome"]
code: def __init__(self, ctx, f, x0, **kwargs):
      self.ctx = ctx
      self.f = f
      if isinstance(x0, (tuple, list)):
          x0 = ctx.matrix(x0)
      assert x0.cols == 1, "need a vector"
      self.x0 = x0
      if "J" in kwargs:
          self.J = kwargs["J"]
      else:
  
          def J(*x):
              return ctx.jacobian(f, x)
  
          self.J = J
      self.norm = kwargs["norm"]
      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 MDNewton object  with example: obj = MDNewton(ctx, f, x0)