Closed
Description
tools.datetimes has to dig into IntegerArray internals in a way that in principle should be handled by IntegerArray.astype
ser = pd.Series(range(2), dtype="Int64")
arr = ser.array
>>> arr.astype("datetime64[ns]")
array(['1970-01-01T00:00:00.000000000', '1970-01-01T00:00:00.000000001'],
dtype='datetime64[ns]')
arr[-1] = pd.NA
>>> arr.astype("datetime64[ns]")
ValueError: cannot convert to 'datetime64[ns]'-dtype NumPy array with missing values. Specify an appropriate 'na_value' for this dtype.