I have a numpy array x of dtype np.int64 representing nanoseconds. I'm able to convert this into a numpy array of dtype np.datetime64 with the following code:
np.array([np.datetime64(int(a), 'ns') for a in x])
Is there a better way to do this, that avoids python list comprehension?