numdifftools.core.directionaldiff

numdifftools.core.directionaldiff(f, x0, vec, **options)[source][source]

Return directional derivative of a function of n variables

Parameters:

f: function

analytical function to differentiate.

x0: array

vector location at which to differentiate f. If x0 is an nxm array, then fun is assumed to be a function of n*m variables.

vec: array

vector defining the line along which to take the derivative. It should be the same size as x0, but need not be a vector of unit length.

**options:

optional arguments to pass on to Derivative.

Returns:

dder: scalar

estimate of the first derivative of f in the specified direction.

See also

Derivative, Gradient