BUG: Segmentation fault in RollingGroupby.mean() with center=True and input with odd length #35552
Closed
2 of 3 tasks
Labels
Regression
Functionality that used to work in a prior pandas version
Segfault
Non-Recoverable Error
Window
rolling, ewma, expanding
Milestone
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample, a copy-pastable example
Problem description
With an odd-length series and
center=True
,RollingGroupby.mean()
causes a segfault. Ifcenter=True
is not provided, or the input series has an even length, then there is no no segfault (example below).Outputs:
The series can be grouped in any way, but the example above seemed simplest.
Expected Output
Should output a Series.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : d9fff27
python : 3.7.7.final.0
python-bits : 64
OS : Linux
OS-release : 4.18.0-25-generic
Version : #26-Ubuntu SMP Mon Jun 24 09:32:08 UTC 2019
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.1.0
numpy : 1.19.1
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 49.2.0.post20200714
Cython : None
pytest : 6.0.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pyxlsb : None
s3fs : None
scipy : 1.5.2
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: