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 f

Returns:

jvp (array-like) – Jacobian times vectors v, summed over different argnums