Skip to content
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

MemoryError when using series.rolling().corr(other) with >1.0 #31789

Closed
mdering opened this issue Feb 7, 2020 · 1 comment · Fixed by #31841
Closed

MemoryError when using series.rolling().corr(other) with >1.0 #31789

mdering opened this issue Feb 7, 2020 · 1 comment · Fixed by #31841
Assignees
Labels
Regression Functionality that used to work in a prior pandas version
Milestone

Comments

@mdering
Copy link

mdering commented Feb 7, 2020

Code Sample, a copy-pastable example if possible

srs1 = pd.Series(np.random.rand(11521),pd.date_range('2019-08-15', '2019-08-23',freq='1T'))
srs2 = pd.Series(np.random.rand(11521),pd.date_range('2019-08-15', '2019-08-23',freq='1T'))
srs1.rolling(pd.to_timedelta("12H")).corr(srs2)

Problem description

Running the code above results in the following error Unable to allocate 314. TiB for an array with shape (43200000000000,) and data type int64 on pandas 1.0.1. Confirmed that this used to work on pandas 0.25.3.

Expected Output

The correct calculations

Output of pd.show_versions()

INSTALLED VERSIONS

commit : None
python : 3.7.4.final.0
python-bits : 64
OS : Darwin
OS-release : 19.2.0
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8

pandas : 1.0.1
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 45.1.0.post20200127
Cython : 0.29.14
pytest : 5.3.5
hypothesis : 5.4.1
sphinx : 2.3.1
blosc : None
feather : None
xlsxwriter : 1.2.7
lxml.etree : 4.5.0
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.12.0
pandas_datareader: None
bs4 : 4.8.2
bottleneck : 1.3.1
fastparquet : 0.3.2
gcsfs : None
lxml.etree : 4.5.0
matplotlib : 3.1.3
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : 0.13.0
pytables : None
pytest : 5.3.5
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : 1.3.13
tables : 3.6.1
tabulate : None
xarray : 0.13.0
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.2.7
numba : 0.48.0

@MarcoGorelli MarcoGorelli added the Regression Functionality that used to work in a prior pandas version label Feb 7, 2020
@jorisvandenbossche jorisvandenbossche added this to the 1.0.2 milestone Feb 7, 2020
@jorisvandenbossche
Copy link
Member

@mdering Thanks for the report!

cc @mroeschke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regression Functionality that used to work in a prior pandas version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants