Skip to content

Commit

Permalink
note TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
dfulu committed Aug 6, 2024
1 parent 387c8d0 commit 092147d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ocf_data_sampler/select/find_contiguous_t0_time_periods.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@ def intersection_of_2_dataframes_of_periods(a: pd.DataFrame, b: pd.DataFrame) ->
# b: |--| |---| |---| |------| |-|
# In all five, `a` must always start before `b` ends,
# and `a` must always end after `b` starts:

# TODO: <= and >= because we should allow overlap time periods of length 1. e.g.
# a: |----| or |---|
# b: |--| |---|
# These aren't allowed if we use < and >.

overlapping_periods = b[(a_period.start_dt < b.end_dt) & (a_period.end_dt > b.start_dt)]

# There are two ways in which two periods may *not* overlap:
Expand Down

0 comments on commit 092147d

Please sign in to comment.