You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0 NaN
1 NaN
2 6.0
3 9.0
4 12.0
5 15.0
6 18.0
7 21.0
8 24.0
dtype: float64
Problem description
In working with big amounts of data that do not require the higher precision of float64, I tend to use float32. This improves both storage and computation time.
Similarly I would like for all the calculation with such data to be done in float32. The example above shows that rolling operations always return float64 regardless of the type of the input. Is it possible to force rolling calculations at float32?
@jreback I couldn't find a duplicate of this issue. I've found #15599 which maybe has the same root cause as this issue. But I understand the reasoning behind casting from int to float if we want to do, say, a rolling mean.
In my example, I would like to use and keep the result at float32. That's why I opened this one.
But if you still think this is a duplicate I can close this one. Just let me know.
Code Sample
0 1.0
1 2.0
2 3.0
3 4.0
4 5.0
5 6.0
6 7.0
7 8.0
8 9.0
dtype: float32
0 NaN
1 NaN
2 6.0
3 9.0
4 12.0
5 15.0
6 18.0
7 21.0
8 24.0
dtype: float64
Problem description
In working with big amounts of data that do not require the higher precision of float64, I tend to use float32. This improves both storage and computation time.
Similarly I would like for all the calculation with such data to be done in float32. The example above shows that rolling operations always return float64 regardless of the type of the input. Is it possible to force rolling calculations at float32?
INSTALLED VERSIONS
commit: None
python: 3.7.1.final.0
python-bits: 64
OS: Darwin
OS-release: 18.2.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: pt_PT.UTF-8
LOCALE: pt_PT.UTF-8
pandas: 0.23.4
pytest: 4.0.1
pip: 18.1
setuptools: 40.6.2
Cython: None
numpy: 1.15.4
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: None
patsy: 0.5.1
dateutil: 2.7.5
pytz: 2018.7
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: