Skip to content

Commit b1f7327

Browse files
authored
Fix wrong call to TimeSeries.from_series() (#2719)
1 parent 80b812e commit b1f7327

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ but cannot always guarantee backwards compatibility. Changes that may **break co
2020
**Fixed**
2121

2222
- 🔴 / 🟢 Fixed a bug which raised an error when loading torch models that were saved with Darts versions < 0.33.0. This is a breaking change and models saved with version 0.33.0 will not be loadable anymore. [#2692](https://github.com/unit8co/darts/pull/2692) by [Dennis Bader](https://github.com/dennisbader).
23+
- Fixed a bug in `13-TFT-examples.ipynb` where two calls to `TimeSeries.from_series()` were not providing `series` but `pd.Index`. The method calls were changed to `TimeSeries.from_values()`. [#2719](https://github.com/unit8co/darts/pull/2719) by [Jules Authier](https://github.com/authierj)
2324

2425
**Dependencies**
2526

examples/13-TFT-examples.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
"series = AirPassengersDataset().load()\n",
150150
"\n",
151151
"# we convert monthly number of passengers to average daily number of passengers per month\n",
152-
"series = series / TimeSeries.from_series(series.time_index.days_in_month)\n",
152+
"series = series / TimeSeries.from_values(series.time_index.days_in_month)\n",
153153
"series = series.astype(np.float32)\n",
154154
"\n",
155155
"# Create training and validation sets:\n",
@@ -570,7 +570,7 @@
570570
"for col in [\"ice cream\", \"heater\"]:\n",
571571
" converted_series.append(\n",
572572
" series_ice_heater[col]\n",
573-
" / TimeSeries.from_series(series_ice_heater.time_index.days_in_month)\n",
573+
" / TimeSeries.from_values(series_ice_heater.time_index.days_in_month)\n",
574574
" )\n",
575575
"converted_series = concatenate(converted_series, axis=1)\n",
576576
"converted_series = converted_series[pd.Timestamp(\"20100101\") :]\n",

0 commit comments

Comments
 (0)