-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: roll_skew and roll_kurt compute different result when input same data with diffrent length #54380
Comments
Hi, thanks for your report. Are you sure that this is not caused by a loss of precision? Your values are quite large for these algorithms |
I don't think it is caused by loss of precision, and value (-1000, 1000) is not very large value,is it?
|
Hi, I am running into the same issue currently. Any ideas? |
check my patch for temp solution :) |
Yes, I saw it, thanks! The issue is that I'm in a company setting and I cannot recompile Cython code... |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
rolling skew and kurt compute different result when input same data with diffrent length.
With the rolling window of exactly same data, I think it is wired to have different result right?
It is basically caused by minus mean value from the series, in source tree pandas/_libs/window/aggregations.pyx:621-624 and same code exist in roll_kurt too.
Expected Behavior
rolling skew and kurt result should be same.
Installed Versions
INSTALLED VERSIONS
commit : 0f43794
python : 3.10.7.final.0
python-bits : 64
OS : Linux
OS-release : 5.19.0-46-generic
Version : #47-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 16 13:30:11 UTC 2023
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 2.0.3
numpy : 1.23.1
pytz : 2023.3
dateutil : 2.8.2
setuptools : 59.6.0
pip : 23.2.1
Cython : 0.29.34
pytest : 7.3.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : 3.1.2
lxml.etree : 4.9.2
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.13.2
pandas_datareader: None
bs4 : 4.12.2
bottleneck : None
brotli : None
fastparquet : None
fsspec : 2023.5.0
gcsfs : None
matplotlib : 3.7.1
numba : 0.57.0
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 12.0.0
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.10.1
snappy : None
sqlalchemy : 2.0.16
tables : None
tabulate : 0.9.0
xarray : None
xlrd : None
zstandard : None
tzdata : 2023.3
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: