pint.utils.check_all_partials

pint.utils.check_all_partials(f, args, delta=1e-06, atol=0.0001, rtol=0.0001)[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.