Skip to content

Commit

Permalink
Release
Browse files Browse the repository at this point in the history
  • Loading branch information
cerlymarco committed Jul 4, 2021
1 parent 5ebe3bb commit 47d94c2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

HERE = pathlib.Path(__file__).parent

VERSION = '1.0.2'
VERSION = '1.0.3'
PACKAGE_NAME = 'tsmoothie'
AUTHOR = 'Marco Cerliani'
AUTHOR_EMAIL = '[email protected]'
Expand Down
11 changes: 5 additions & 6 deletions tsmoothie/smoother.py
Original file line number Diff line number Diff line change
Expand Up @@ -1260,13 +1260,12 @@ def smooth(self, data):
seasonal = [np.tile(p_a, (1, nobs // periods[i] + 1))[:, :nobs]
for i, p_a in enumerate(period_averages)]

if self.method == 'additive':
smooth = smoother.smooth_data
for season in seasonal:
data = smoother.data
smooth = smoother.smooth_data
for season in seasonal:
if self.method == 'additive':
smooth += season
else:
smooth = smoother.smooth_data
for season in seasonal:
else:
smooth *= season

self._store_results(smooth_data=smooth, data=data)
Expand Down
4 changes: 2 additions & 2 deletions tsmoothie/utils_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ def fit(self, X, y, sample_weight):
self : returns an instance of self
"""

X, y, X_offset, y_offset, X_scale = self._preprocess_data(X, y,
sample_weight=sample_weight)
X, y, X_offset, y_offset, X_scale = self._preprocess_data(
X, y, sample_weight=sample_weight)

if np.unique(sample_weight).shape[0] > 1:
X, y = self._rescale_data(X, y, sample_weight)
Expand Down

0 comments on commit 47d94c2

Please sign in to comment.