title: How to convert numpy datetime64 [ns] to python datetime?
body: <p>I need to convert dates from pandas frame values in the separate function:</p>
  
  <pre><code> def myfunc(lat, lon, when):
          ts = (when - np.datetime64('1970-01-01T00:00:00Z','s')) / np.timedelta64(1, 's')
          date = datetime.datetime.utcfromtimestamp(ts)
          print("Numpy date= ", when, " Python date= ", date)
          return float(90) - next_func(lat, lon, date)
  </code></pre>
  
  <p>Invokation this function:</p>
  
  <pre><code>new_df['new_column'] =  np.vectorize(my_func)(lat, lon, new_df['datetime(LT)'])  
  </code></pre>
  
  <p>But it raise error:</p>
  
  <pre><code>ufunc subtract cannot use operands with types dtype('int64') and dtype('&lt;M8[s]')
  </code></pre>
  
  <p>How to convert numpy datetime64 [ns] to python datetime?</p>