File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -252,18 +252,15 @@ def _dt64_to_ordinalf(d):
252252 because we do times compared to ``0001-01-01T00:00:00`` (plus one day).
253253 """
254254
255- zerod = False
256- if isinstance (d , np .datetime64 ):
257- zerod = True
258- d = np .atleast_1d (d )
255+ # the "extra" ensures that we at least allow the dynamic range out to
256+ # seconds. That should get out to +/-2e11 years.
259257 extra = d - d .astype ('datetime64[s]' )
260258 extra = extra .astype ('timedelta64[ns]' )
261259 t0 = np .datetime64 ('0001-01-01T00:00:00' ).astype ('datetime64[s]' )
262260 dt = (d .astype ('datetime64[s]' ) - t0 ).astype (np .float64 )
263261 dt += extra .astype (np .float64 ) / 1.0e9
264262 dt = dt / SEC_PER_DAY + 1.0
265- if zerod :
266- dt = dt [0 ]
263+
267264 return dt
268265
269266
You can’t perform that action at this time.
0 commit comments