Skip to content

Commit

Permalink
Release
Browse files Browse the repository at this point in the history
  • Loading branch information
cerlymarco committed Jul 15, 2021
1 parent 47d94c2 commit 40c289b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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.3'
VERSION = '1.0.4'
PACKAGE_NAME = 'tsmoothie'
AUTHOR = 'Marco Cerliani'
AUTHOR_EMAIL = 'cerlymarco@gmail.com'
Expand Down
7 changes: 6 additions & 1 deletion tsmoothie/smoother.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,12 @@ def smooth(self, data):
else:
rfft[n_coeff:] = 0

smooth = np.fft.irfft(rfft, axis=0)
if data.shape[0] % 2 > 0:
n = 2 * rfft.shape[0] - 1
else:
n = 2 * (rfft.shape[0] - 1)

smooth = np.fft.irfft(rfft, n=n, axis=0)
smooth = smooth[self.pad_len:-self.pad_len]

smooth = _check_output(smooth)
Expand Down

0 comments on commit 40c289b

Please sign in to comment.