gncpy.math.get_jacobian
- get_jacobian(x, fnc, f_args=(), step_size=1e-07)[source]
Calculates the jacobian of a function.
Numerically calculates the jacobian using the central difference method.
- Parameters:
x (numpy array) – The point to evaluate about.
fnc (callable) – The function to evaluate, must be of the form f(x, *f_args).
f_args (tuple, optional) – Additional argumets for fnc. The default is ().
step_size (float, optional) – The step size to use when calculating the jacobian. The default is 10**-7.
- Returns:
jac – The jacobain of the function
- Return type:
N x 1 numpy array