Simple wrapper for SciPy’s gradient checker.
The given function must return a tuple: (value, gradient).
Returns absolute and relative errors