Skip to content

Commit 9a1fee4

Browse files
committed
don't ravel twice in decode_cf_datetime
1 parent fcfa9e9 commit 9a1fee4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xray/conventions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def decode_cf_datetime(num_dates, units, calendar=None):
130130
delta = _netcdf_to_numpy_timeunit(delta)
131131
ref_date = pd.Timestamp(ref_date)
132132

133-
dates = (pd.to_timedelta(num_dates.ravel(), delta) + ref_date).values
133+
dates = (pd.to_timedelta(flat_num_dates, delta) + ref_date).values
134134
# ValueError is raised by pd.Timestamp for non-ISO timestamp strings,
135135
# in which case we fall back to using netCDF4
136136
except (OutOfBoundsDatetime, ValueError, OverflowError):

0 commit comments

Comments
 (0)