desc.derivatives.AutoDiffDerivative.compute_jvp2

classmethod AutoDiffDerivative.compute_jvp2(fun, argnum1, argnum2, v1, v2, *args)[source]

Compute d^2f/dx^2*v1*v2.

Parameters:
  • fun (callable) – function to differentiate

  • argnum1 (int or tuple of int) – arguments to differentiate with respect to. First entry corresponds to v1, second to v2

  • argnum2 (int or tuple of int) – arguments to differentiate with respect to. First entry corresponds to v1, second to v2

  • v1 (array-like or tuple of array-like) – tangent vectors. Should be one for each argnum

  • v2 (array-like or tuple of array-like) – tangent vectors. Should be one for each argnum

  • args (tuple) – arguments passed to f

Returns:

jvp2 (array-like) – second derivative times vectors v1, v2, summed over different argnums