Skip to content

Commit

Permalink
Add minus sign to event_start_idx in atsc.counting.data line 240 (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefano Damiano <stefano.damiano@esat.kuleuven.be>
  • Loading branch information
steDamiano and Stefano Damiano authored Jun 3, 2024
1 parent f45b5da commit cbb23b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion atsc/counting/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def __getitem__(self, item: int) -> dict[str, Tensor | int]:

if event_start_idx < 0:
# Event starts before the beginning of the segment
event_audio = event_audio[:, event_start_idx:]
event_audio = event_audio[:, -event_start_idx:]
audio_segment[:, : event_audio.shape[-1]] += event_audio
elif event_start_idx + event_audio.shape[-1] > audio_segment.shape[-1]:
# Event ends after the end of the segment
Expand Down

0 comments on commit cbb23b9

Please sign in to comment.