Skip to content

Commit b22e4d9

Browse files
author
Franz Király
committed
Update timeseries.py
1 parent e1e3ee7 commit b22e4d9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pytorch_forecasting/data/timeseries.py

+2
Original file line numberDiff line numberDiff line change
@@ -1402,6 +1402,8 @@ def _to_tensor(cols, long=True):
14021402
if not isinstance(cols, list) and cols not in data.columns:
14031403
return None
14041404
if isinstance(cols, list):
1405+
if len(cols) == 0:
1406+
return []
14051407
dtypekind = data.dtypes[cols[0]].kind
14061408
else:
14071409
dtypekind = data.dtypes[cols].kind

0 commit comments

Comments
 (0)