I think the right heck is `np.issubdtype(data.dtype, np.datetime64)`, which will cover both these cases.