title: Creating numpy linspace out of datetime
body: <p>I'm writing a script that plots some data with dates on the x axis (in matplotlib). I need to create a <code>numpy.linspace</code> out of those dates in order  to create a spline afterwards. Is it possible to do that?</p>
  <p>What I've tried:</p>
  <pre><code>import datetime
  import numpy as np
  
  dates = [
      datetime.datetime(2015, 7, 2, 0, 31, 41),
      datetime.datetime(2015, 7, 2, 1, 35),
      datetime.datetime(2015, 7, 2, 2, 37, 9),
      datetime.datetime(2015, 7, 2, 3, 59, 16),
      datetime.datetime(2015, 7, 2, 5, 2, 23)
  ]
  
  x = np.linspace(min(dates), max(dates), 500)
  </code></pre>
  <p>It throws this error:</p>
  <pre><code>TypeError: unsupported operand type(s) for *: 'datetime.datetime' and 'float'
  </code></pre>
  <p>I've also tried converting <code>datetime</code> to <code>np.datetime64</code>, but that doesn't work as well:</p>
  <pre><code>dates = [np.datetime64(i) for i in dates]
  x = np.linspace(min(dates), max(dates), 500)
  </code></pre>
  <p>Error:</p>
  <pre><code>TypeError: ufunc multiply cannot use operands with types dtype('&lt;M8[us]') and dtype('float64')
  </code></pre>