Skip to content

Commit

Permalink
specify boolean series type to avoid future warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jarq6c committed Feb 9, 2024
1 parent 3f39564 commit 200bc03
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ def event_boundaries(event_points: pd.Series):
"""
# Identify event starts
forward_shift = event_points.shift(1).fillna(False)
forward_shift = event_points.shift(1).astype(bool).fillna(False)
starts = (event_points & ~forward_shift)
starts = starts[starts]

# Identify event ends
backward_shift = event_points.shift(-1).fillna(False)
backward_shift = event_points.shift(-1).astype(bool).fillna(False)
ends = (event_points & ~backward_shift)
ends = ends[ends]

Expand Down

0 comments on commit 200bc03

Please sign in to comment.