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
import pandas as pd
import numpy as np
pd.DataFrame(np.arange(5, dtype=np.float32)).rolling(window=3).max()
stack trace:
<ipython-input-25-795ba6485799> in <module>()
----> 1 pd.DataFrame(np.arange(5, dtype=np.float32)).rolling(window=3).max()
/venv/lib/python3.4/site-packages/pandas/core/window.py in max(self, **kwargs)
767 @Appender(_shared_docs['max'])
768 def max(self, **kwargs):
--> 769 return super(Rolling, self).max(**kwargs)
770
771 @Substitution(name='rolling')
/venv/lib/python3.4/site-packages/pandas/core/window.py in max(self, how, **kwargs)
541 if self.freq is not None and how is None:
542 how = 'max'
--> 543 return self._apply('roll_max', how=how, **kwargs)
544
545 _shared_docs['min'] = dedent("""
/venv/lib/python3.4/site-packages/pandas/core/window.py in _apply(self, func, window, center, check_minp, how, **kwargs)
474
475 if values.ndim > 1:
--> 476 result = np.apply_along_axis(calc, self.axis, values)
477 else:
478 result = calc(values)
/venv/lib/python3.4/site-packages/numpy/lib/shape_base.py in apply_along_axis(func1d, axis, arr, *args, **kwargs)
89 outshape = asarray(arr.shape).take(indlist)
90 i.put(indlist, ind)
---> 91 res = func1d(arr[tuple(i.tolist())], *args, **kwargs)
92 # if res is a number, then we have a smaller output array
93 if isscalar(res):
/venv/lib/python3.4/site-packages/pandas/core/window.py in calc(x)
471
472 def calc(x):
--> 473 return func(x, window, min_periods=self.min_periods)
474
475 if values.ndim > 1:
/venv/lib/python3.4/site-packages/pandas/core/window.py in func(arg, window, min_periods)
458 def func(arg, window, min_periods=None):
459 minp = check_minp(min_periods, window)
--> 460 return cfunc(arg, window, minp, **kwargs)
461
462 # calculation function
pandas/algos.pyx in pandas.algos.roll_max (pandas/algos.c:37363)()
ValueError: Buffer dtype mismatch, expected 'float64_t' but got 'float'
The text was updated successfully, but these errors were encountered:
jennolsen84
changed the title
BUG: rolling functions raises ValueError float32 data
BUG: rolling functions raise ValueError float32 data
Feb 17, 2016
jennolsen84
changed the title
BUG: rolling functions raise ValueError float32 data
BUG: rolling functions raise ValueError on float32 data
Feb 17, 2016
pd version: v0.18.0rc1
minimal example:
stack trace:
The text was updated successfully, but these errors were encountered: