title: Converting pandas DatetimeIndex to 'float days format' with Matplotlib.dates.datestr2num
body: <p>Some Matplotlib methods need days in <a href="http://matplotlib.org/api/dates_api.html" rel="noreferrer">'float days format'</a>. datestr2num is a converter function for this, but it falls over with the relevant pandas objects:</p>
  
  <pre><code>In [3]: type(df.index)
  Out[3]: pandas.tseries.index.DatetimeIndex
  In [4]: type(df.index[0])
  Out[4]: pandas.tslib.Timestamp
  In [5]: mpl.dates.date2num(df.index)
  Out [5]: ...
  AttributeError: 'numpy.datetime64' object has no attribute 'toordinal'
  </code></pre>
  
  <p>This provides a usable list of times in 'float days format':</p>
  
  <pre><code>dates = [mpl.dates.date2num(t) for t in df.index]
  </code></pre>
  
  <p>But is there a better way?</p>