Skip to content

Commit ca09705

Browse files
committed
get symmetric window
1 parent 2cad4dd commit ca09705

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

pandas/core/window.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,9 @@ def _pop_args(win_type, arg_names, kwargs):
544544
return all_args
545545

546546
win_type = _validate_win_type(self.win_type, kwargs)
547-
return sig.get_window(win_type, window).astype(float)
547+
# GH #15662.
548+
# fftbins should be False; previously it was a mistake on pandas' side.
549+
return sig.get_window(win_type, window, fftbins=False).astype(float)
548550

549551
def _apply_window(self, mean=True, how=None, **kwargs):
550552
"""

pandas/tests/test_window.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ def test_cmov_window_na_min_periods(self):
905905

906906
def test_cmov_window_regular(self):
907907
# GH 8238
908-
tm.skip_if_no_package('scipy', max_version='0.19.0')
908+
tm._skip_if_no_scipy()
909909

910910
win_types = ['triang', 'blackman', 'hamming', 'bartlett', 'bohman',
911911
'blackmanharris', 'nuttall', 'barthann']
@@ -938,7 +938,7 @@ def test_cmov_window_regular(self):
938938

939939
def test_cmov_window_regular_linear_range(self):
940940
# GH 8238
941-
tm.skip_if_no_package('scipy', max_version='0.19.0')
941+
tm._skip_if_no_scipy()
942942

943943
win_types = ['triang', 'blackman', 'hamming', 'bartlett', 'bohman',
944944
'blackmanharris', 'nuttall', 'barthann']
@@ -955,7 +955,7 @@ def test_cmov_window_regular_linear_range(self):
955955

956956
def test_cmov_window_regular_missing_data(self):
957957
# GH 8238
958-
tm.skip_if_no_package('scipy', max_version='0.19.0')
958+
tm._skip_if_no_scipy()
959959

960960
win_types = ['triang', 'blackman', 'hamming', 'bartlett', 'bohman',
961961
'blackmanharris', 'nuttall', 'barthann']
@@ -988,7 +988,7 @@ def test_cmov_window_regular_missing_data(self):
988988

989989
def test_cmov_window_special(self):
990990
# GH 8238
991-
tm.skip_if_no_package('scipy', max_version='0.19.0')
991+
tm._skip_if_no_scipy()
992992

993993
win_types = ['kaiser', 'gaussian', 'general_gaussian', 'slepian']
994994
kwds = [{'beta': 1.}, {'std': 1.}, {'power': 2.,
@@ -1015,7 +1015,7 @@ def test_cmov_window_special(self):
10151015

10161016
def test_cmov_window_special_linear_range(self):
10171017
# GH 8238
1018-
tm.skip_if_no_package('scipy', max_version='0.19.0')
1018+
tm._skip_if_no_scipy()
10191019

10201020
win_types = ['kaiser', 'gaussian', 'general_gaussian', 'slepian']
10211021
kwds = [{'beta': 1.}, {'std': 1.}, {'power': 2.,

0 commit comments

Comments
 (0)