rolling.sum() of zeros produce positive output w/ float64 #24208
Labels
Bug
Duplicate Report
Duplicate issue or pull request
Numeric Operations
Arithmetic, Comparison, and Logical operations
Window
rolling, ewma, expanding
Code Sample, a copy-pastable example if possible
Problem description
The sum of a window of float32 zeros is zero, but the sum of a window of float64 zeros is a tiny, positive number. This is concerning, because ratio calculations like growth rates can "blow up" with tiny numbers.
Expected Output
0.23.4
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.6.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-103-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.23.4
pytest: 3.9.1
pip: 18.1
setuptools: 39.1.0
Cython: None
numpy: 1.15.3
scipy: 1.1.0
pyarrow: 0.11.0
xarray: 0.10.9
IPython: 7.0.1
sphinx: None
patsy: 0.5.1
dateutil: 2.7.3
pytz: 2018.5
blosc: None
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.8
feather: None
matplotlib: 3.0.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.6.3
html5lib: 1.0.1
sqlalchemy: None
pymysql: None
psycopg2: 2.7.5 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: