Skip to content

Commit

Permalink
Add empty sequence treatment.
Browse files Browse the repository at this point in the history
  • Loading branch information
ymatzkevich committed Nov 12, 2024
1 parent b6f6812 commit 5153fd9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions darts/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -5672,6 +5672,8 @@ def intersect(series: Sequence[TimeSeries]):
Sequence[TimeSeries]
Intersected series
"""
if not series:
return []

data_arrays = []
has_datetime_index = series[0].has_datetime_index
Expand Down

0 comments on commit 5153fd9

Please sign in to comment.