def _set_axis(self, axis, labels, fastpath=False):
if not fastpath:<EOL><INDENT>labels = ensure_index(labels)<EOL><DEDENT>is_all_dates = labels.is_all_dates<EOL>if is_all_dates:<EOL><INDENT>if not isinstance(labels,<EOL>(DatetimeIndex, PeriodIndex, TimedeltaIndex)):<EOL><INDENT>try:<EOL><INDENT>labels = DatetimeIndex(labels)<EOL>if fastpath:<EOL><INDENT>self._data.set_axis(axis, labels)<EOL><DEDENT><DEDENT>except (tslibs.OutOfBoundsDatetime, ValueError):<EOL><INDENT>pass<EOL><DEDENT><DEDENT><DEDENT>self._set_subtyp(is_all_dates)<EOL>object.__setattr__(self, '<STR_LIT>', labels)<EOL>if not fastpath:<EOL><INDENT>self._data.set_axis(axis, labels)<EOL><DEDENT>
Override generic, we want to set the _typ here.