pint.utils.check_all_partials

pint.utils.check_all_partials(f: Callable, args: List | Tuple, delta: float = 1e-06, atol: float = 0.0001, rtol: float = 0.0001) None[source]

Check the partial derivatives of a function that returns derivatives.

The function is assumed to return a pair (values, partials), where partials is supposed to be a matrix of the partial derivatives of f with respect to all its arguments. These values are checked against numerical partial derivatives.