class_docstr: A general minimizer for curve fitting and optimization.
class_docstr_tok: ["A","general","minimizer","for","curve","fitting","and","optimization","."]
docstr: Return analytical jacobian to be used with Levenberg-Marquardt.
  
  modified 02-01-2012 by Glenn Jones, Aberystwyth University
  modified 06-29-2015 by M Newville to apply gradient scaling for
  bounded variables (thanks to JJ Helmus, N Mayorov)
docstr_tok: ["Return","analytical","jacobian","to","be","used","with","Levenberg-Marquardt",".","modified","02-01-2012","by","Glenn","Jones",",","Aberystwyth","University","modified","06-29-2015","by","M","Newville","to","apply","gradient","scaling","for","bounded","variables","(","thanks","to","JJ","Helmus",",","N","Mayorov",")"]
code: def __jacobian(self, fvars):
      """Return analytical jacobian to be used with Levenberg-Marquardt.
  
      modified 02-01-2012 by Glenn Jones, Aberystwyth University
      modified 06-29-2015 by M Newville to apply gradient scaling for
      bounded variables (thanks to JJ Helmus, N Mayorov)
  
      """
      pars = self.result.params
      grad_scale = np.ones_like(fvars)
      for ivar, name in enumerate(self.result.var_names):
          val = fvars[ivar]
          pars[name].value = pars[name].from_internal(val)
          grad_scale[ivar] = pars[name].scale_gradient(val)
  
      pars.update_constraints()
  
      # compute the jacobian for "internal" unbounded variables,
      # then rescale for bounded "external" variables.
      jac = self.jacfcn(pars, *self.userargs, **self.userkws)
      jac = coerce_float64(jac, nan_policy=self.nan_policy, ravel=False)
  
      if self.col_deriv:
          jac = (jac.transpose() * grad_scale).transpose()
      else:
          jac *= grad_scale
      return jac
  
imports: from collections import namedtuple
  from copy import deepcopy
  import inspect
  import multiprocessing
  import numbers
  import warnings
  import numpy
  from scipy.linalg import LinAlgError, inv
  from scipy.optimize import basinhopping
  from scipy.optimize import brute
  from scipy.optimize import differential_evolution
  from scipy.optimize import dual_annealing
  from scipy.optimize import least_squares
  from scipy.optimize import leastsq
  from scipy.optimize import minimize
  from scipy.optimize import shgo
  from scipy.sparse import issparse
  from scipy.sparse.linalg import LinearOperator
  from scipy.stats import cauchy
  from scipy.stats import norm
  from ._ampgo import ampgo
  from .parameter import Parameter, Parameters
  from .printfuncs import fitreport_html_table
label_desc: Use image node_id 5 for calling the Minimizer obj's underlying member method code with example usage: obj.__jacobian(fvars) and returns: jac