Skip to content

Commit f9c4169

Browse files
spencerkclarkshoyer
authored andcommitted
Fix FutureWarning in CFTimeIndex.date_type (#2448)
1 parent 23d1cda commit f9c4169

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xarray/coding/cftimeindex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def f(self):
157157

158158

159159
def get_date_type(self):
160-
if self.data:
160+
if self._data.size:
161161
return type(self._data[0])
162162
else:
163163
return None

0 commit comments

Comments
 (0)