code: def approx_jacobian(x, func, epsilon, *args):
      """
      Approximate the Jacobian matrix of a callable function.
  
      Parameters
      ----------
      x : array_like
          The state vector at which to compute the Jacobian matrix.
      func : callable f(x,*args)
          The vector-valued function.
      epsilon : float
          The perturbation used to determine the partial derivatives.
      args : sequence
          Additional arguments passed to func.
  
      Returns
      -------
      An array of dimensions ``(lenf, lenx)`` where ``lenf`` is the length
      of the outputs of `func`, and ``lenx`` is the number of elements in
      `x`.
  
      Notes
      -----
      The approximation is done using forward differences.
  
      """
      x0 = asfarray(x)
      f0 = atleast_1d(func(*((x0,) + args)))
      jac = zeros([len(x0), len(f0)])
      dx = zeros(len(x0))
      for i in range(len(x0)):
          dx[i] = epsilon
          jac[i] = (func(*((x0 + dx,) + args)) - f0) / epsilon
          dx[i] = 0.0
  
      return jac.transpose()
  
file_path: catboost/contrib/python/scipy/py2/scipy/optimize/slsqp.py
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from scipy.optimize._slsqp import slsqp
  from numpy import zeros, array, linalg, append, asfarray, concatenate, finfo, sqrt, vstack, exp, inf, isfinite, atleast_1d
  from .optimize import wrap_function, OptimizeResult, _check_unknown_options
label_desc: Use image node_id 1 for calling a global function with example usage: approx_jacobian(x, func, epsilon) and returns: jac