I am using Newton\'s method via scipy.optimize.newton to find the root of a univariate function. I would like to calculate the gradient and objective in the same step, as they s