File tree 1 file changed +1
-7
lines changed
1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -249,17 +249,11 @@ def _decode_datetime_with_pandas(
249
249
if flat_num_dates .dtype .kind in "iu" :
250
250
flat_num_dates = flat_num_dates .astype (np .int64 )
251
251
252
- # Cast input ordinals to integers of nanoseconds because pd.to_timedelta
253
- # works much faster when dealing with integers (GH 1399).
254
- flat_num_dates_ns_int = (flat_num_dates * _NS_PER_TIME_DELTA [delta ]).astype (
255
- np .int64
256
- )
257
-
258
252
# Use pd.to_timedelta to safely cast integer values to timedeltas,
259
253
# and add those to a Timestamp to safely produce a DatetimeIndex. This
260
254
# ensures that we do not encounter integer overflow at any point in the
261
255
# process without raising OutOfBoundsDatetime.
262
- return (pd .to_timedelta (flat_num_dates_ns_int , "ns" ) + ref_date ).values
256
+ return (pd .to_timedelta (flat_num_dates , delta ) + ref_date ).values
263
257
264
258
265
259
def decode_cf_datetime (
You can’t perform that action at this time.
0 commit comments