num_dual.first_derivative

num_dual.first_derivative(f, x)

Calculate the first derivative of a scalar, univariate function.

Parameters

fcallable

A scalar, univariate function.

xfloat

The value at which the derivative is evaluated.

Returns

function value and first derivative