We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4448828 commit d1049bcCopy full SHA for d1049bc
xarray/core/indexes.py
@@ -135,7 +135,7 @@ def _repr_inline_(self, max_width):
135
def _maybe_cast_to_cftimeindex(index: pd.Index) -> pd.Index:
136
from xarray.coding.cftimeindex import CFTimeIndex
137
138
- if len(index) > 0 and index.dtype == "O":
+ if len(index) > 0 and index.dtype == "O" and not isinstance(index, CFTimeIndex):
139
try:
140
return CFTimeIndex(index)
141
except (ImportError, TypeError):
0 commit comments