<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _doy_to_datetimeindex(doy, epoch_year=2014):
 """ Convert a day of year scalar or array to a pd.DatetimeIndex. Parameters doy : numeric Contains days of the year Returns ------- pd.DatetimeIndex """

    doy = np.atleast_1d(doy).astype('float')
    epoch = pd.Timestamp('{}-12-31'.format(epoch_year - 1))
    timestamps = [epoch + dt.timedelta(days=adoy) for adoy in doy]
    return pd.DatetimeIndex(timestamps)