From 5153fd9899d1f077a836b0ac8f27fe520ec1904b Mon Sep 17 00:00:00 2001 From: ymatzkevich Date: Tue, 12 Nov 2024 16:50:52 +0100 Subject: [PATCH] Add empty sequence treatment. --- darts/timeseries.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/darts/timeseries.py b/darts/timeseries.py index d9b670e011..6d84433401 100644 --- a/darts/timeseries.py +++ b/darts/timeseries.py @@ -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