title: how to convert dtype='datetime64[ns]' to float?
body: <p>I am practicing linear regression and here I am passing dates as input x and expecting an output y(float)</p>
  <pre><code>x = df[('Date')].values
  x = x.reshape(-1, 1)
  y= df[('MeanTemp')].values #MeanTemp column has float values
  y = y.reshape(-1, 1)
  </code></pre>
  <p>and when I print x, the output is:</p>
  <pre><code>array([['1942-07-01T00:00:00.000000000'],
         ['1942-07-02T00:00:00.000000000'],
         ['1942-07-03T00:00:00.000000000'],
         ['1942-07-04T00:00:00.000000000'],
         ['1942-07-05T00:00:00.000000000'],
         ['1942-07-06T00:00:00.000000000'],
         ['1942-07-07T00:00:00.000000000'],
         ['1942-07-08T00:00:00.000000000'],
         ['1942-07-09T00:00:00.000000000'],
         ['1942-07-10T00:00:00.000000000']], dtype='datetime64[ns]')
  </code></pre>
  <p>Now, when I use linear regression</p>
  <pre><code>linlin = LinearRegression()
  linlin.fit(x, y)
  </code></pre>
  <p>It does not give any error but when I write</p>
  <pre><code>linlin.predict(x)
  
  
  TypeError: The DTypes &lt;class 'numpy.dtype[float64]'&gt; and &lt;class 'numpy.dtype[datetime64]'&gt; do not have a common DType. For example they cannot be stored in a single array unless the dtype is `object`.
  </code></pre>
  <p>the above TypeError pops up. How do I convert this data type to float so that the predict function works correctly?</p>