Check the correctness of a gradient function by comparing it against a (forward) finite-difference approximation of the gradient.
Parameters : | func : callable func(x0,*args)
grad : callable grad(x0, *args)
x0 : ndarray
args : *args, optional
|
---|---|
Returns : | err : float
|
See also
approx_fprime