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