title: How do I approximate the Jacobian and Hessian of a function numerically?
body: <p>I have a function in Python:</p>
  
  <pre><code>def f(x):
      return x[0]**3 + x[1]**2 + 7 
      # Actually more than this.
      # No analytical expression
  </code></pre>
  
  <p>It's a scalar valued function of a vector.</p>
  
  <p>How can I approximate the Jacobian and Hessian of this function in numpy or scipy numerically?</p>