Skip to content

Commit

Permalink
nit-picking
Browse files Browse the repository at this point in the history
  • Loading branch information
dfulu committed Aug 13, 2024
1 parent f6f9220 commit 709178a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocf_data_sampler/select/find_contiguous_time_periods.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def find_contiguous_time_periods(
assert datetimes.is_unique

# Find indices of gaps larger than max_gap:
gap_mask = pd.TimedeltaIndex(np.diff(datetimes)) > max_gap_duration
gap_mask = datetimes.diff() > max_gap_duration
gap_indices = np.argwhere(gap_mask)[:, 0]

# gap_indicies are the indices into dt_index for the timestep immediately before the gap.
Expand Down

0 comments on commit 709178a

Please sign in to comment.