parameters: (function, x)
return_statement: return y_ad.derivatives()[0]
docstring: Compute the derivative of the function evaluated at the scalar input x
      using Eigen's automatic differentiation.
  
      The function should be scalar-input and scalar-output.
docstring_summary: Compute the derivative of the function evaluated at the scalar input x
      using Eigen's automatic differentiation.
docstring_tokens: Compute the derivative of the function evaluated at the scalar input x using Eigen s automatic differentiation .
function: def derivative(function, x):
      """Compute the derivative of the function evaluated at the scalar input x
      using Eigen's automatic differentiation.
  
      The function should be scalar-input and scalar-output.
      """
      x_ad = AutoDiffXd(x, np.ones(1))
      y_ad = function(x_ad)
      return y_ad.derivatives()[0]
function_tokens: def derivative ( function , x ) : x_ad = AutoDiffXd ( x , np . ones ( 1 ) ) y_ad = function ( x_ad ) return y_ad . derivatives ( ) [ 0 ]