title: Second order gradient in numpy
body: <p>I am trying to calculate the 2nd-order gradient numerically of an array in numpy.</p>
  
  <pre><code>a = np.sin(np.arange(0, 10, .01))
  da = np.gradient(a)
  dda = np.gradient(da)
  </code></pre>
  
  <p>This is what I come up. Is the the way it should be done?</p>
  
  <p>I am asking this, because in numpy there isn't an option saying np.gradient(a, order=2). I am concerned about whether this usage is wrong, and that is why numpy does not have this implemented.</p>
  
  <p>PS1: I do realize that there is np.diff(a, 2). But this is only single-sided estimation, so I was curious why np.gradient does not have a similar keyword.</p>
  
  <p>PS2: The np.sin() is a toy data - the real data does not have an analytic form.</p>
  
  <p>Thank you!</p>