desc.derivatives.FiniteDiffDerivative.compute_jvp
- classmethod FiniteDiffDerivative.compute_jvp(fun, argnum, v, *args, **kwargs)Source
Compute df/dx*v.
- Parameters:
fun (callable) – function to differentiate
argnum (int or tuple) – arguments to differentiate with respect to
v (array-like or tuple of array-like) – tangent vectors. Should be one for each argnum
args (tuple) – arguments passed to fun
kwargs (dict) – keyword arguments passed to fun
- Returns:
jvp (array-like) – Jacobian times vectors v, summed over different argnums