title: How do you interpolate from an array containing datetime objects?
body: <p>I'm looking for a function analogous to <code>np.interp</code> that can work with <code>datetime</code> objects.</p>
  
  <p>For example:</p>
  
  <pre><code>import datetime, numpy as np
  arr1 = np.array([datetime.datetime(2008,1,d) for d in range(1,10)])
  arr2 = np.arange(1,10)
  
  np.interp(datetime.datetime(2008,1,5,12),arr1,arr2)
  </code></pre>
  
  <p>would ideally return <code>5.5</code>, but <code>numpy</code> raises <code>TypeError: array cannot be safely cast to required type</code>. Is there a nice pythonic way around this?</p>