You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
offset_times with an array n truncates offsets finer than the times' resolution #304
For non-Tick offsets, _offset_times_array_n casts the result back to the input resolution. An offset finer than that resolution is silently dropped with an array n, while a scalar n keeps it:
This path also emits a pandas FutureWarning ("The behavior of array concatenation with empty entries is deprecated") from dt_index[:0].append(runs) when the runs have a finer unit than the input.
Proposed fix: drop the final cast in _offset_times_array_n so an array n keeps the computed resolution, as a scalar n and the Tick path already do. This changes the output dtype for these inputs.
time_ranges has a similar truncation (it casts to starts.dtype), e.g. time_ranges(<datetime64[s] series>, "500ms", 2) repeats each start.
Activity