class_docstr: Class used to wrap around the minimizer used for local search
  Default local minimizer is SciPy minimizer L-BFGS-B
class_docstr_tok: ["Class","used","to","wrap","around","the","minimizer","used","for","local","search","Default","local","minimizer","is","SciPy","minimizer","L-BFGS-B"]
code: def local_search(self, x, e):
      # Run local search from the given x location where energy value is e
      x_tmp = np.copy(x)
      mres = self.minimizer(self.func_wrapper.fun, x, **self.kwargs)
      if "njev" in mres.keys():
          self.func_wrapper.ngev += mres.njev
      if "nhev" in mres.keys():
          self.func_wrapper.nhev += mres.nhev
      # Check if is valid value
      is_finite = np.all(np.isfinite(mres.x)) and np.isfinite(mres.fun)
      in_bounds = np.all(mres.x >= self.lower) and np.all(
          mres.x <= self.upper
      )
      is_valid = is_finite and in_bounds
  
      # Use the new point only if it is valid and return a better results
      if is_valid and mres.fun < e:
          return mres.fun, mres.x
      else:
          return e, x_tmp
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from scipy.optimize import OptimizeResult
  from scipy.optimize import minimize
  from scipy.special import gammaln
  from scipy._lib._util import check_random_state
label_desc: Use image node_id 2 for calling the LocalSearchWrapper obj's underlying member method code with example usage: obj.local_search(x, e) and returns: mres,  mres, e,  x_tmp