statsmodels.tools.numdiff.approx_fprime
statsmodels.tools.numdiff.approx_fprime(x, f, epsilon=None, args=(), kwargs={}, centered=False) [source]
Gradient of function, or Jacobian if function f returns 1d array Parameters:
x : array parameters at which the derivative is evaluated f : function f(*((x,)+args), **kwargs) returning either one value or 1d array epsilon : float, optional Stepsize, if None, optimal stepsize is used. This is EPS**(1/2)*x for centered == False and EPS**(1/3)*x f