We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d636a74 commit c76dc79Copy full SHA for c76dc79
pandas/stats/ols.py
@@ -1197,8 +1197,11 @@ def _results(self):
1197
1198
@cache_readonly
1199
def _window_time_obs(self):
1200
- window_obs = moments.rolling_sum(self._time_obs_count > 0,
1201
- self._window, min_periods=1)
+ window_obs = (Series(self._time_obs_count > 0)
+ .rolling(self._window, min_periods=1)
1202
+ .sum()
1203
+ .values
1204
+ )
1205
1206
window_obs[np.isnan(window_obs)] = 0
1207
return window_obs.astype(int)
@@ -1211,8 +1214,7 @@ def _nobs_raw(self):
1211
1214
# expanding case
1212
1215
window = len(self._index)
1213
1216
- result = moments.rolling_sum(self._time_obs_count, window,
- min_periods=1)
1217
+ result = Series(self._time_obs_count).rolling(window, min_periods=1).sum().values
1218
1219
return result.astype(int)
1220
0 commit comments