Skip to content

Commit 1ca2085

Browse files
committed
adjust_slicing
1 parent 982e152 commit 1ca2085

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

neuralprophet/time_dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ def get_sample_seasonalities(self, df_tensors, origin_index, n_forecasts, max_la
158158

159159
# Determine the range of indices based on whether lags are used
160160
if max_lags == 0:
161-
indices = [origin_index]
161+
indices = slice(origin_index, origin_index + 1)
162162
else:
163-
indices = list(range(origin_index - n_lags + 1, origin_index + n_forecasts + 1))
163+
indices = slice(origin_index - n_lags + 1, origin_index + n_forecasts + 1)
164164

165165
# Extract the precomputed seasonalities from self.seasonalities
166166
for name, features in self.seasonalities.items():

0 commit comments

Comments
 (0)