File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1197,8 +1197,11 @@ def _results(self):
1197
1197
1198
1198
@cache_readonly
1199
1199
def _window_time_obs (self ):
1200
- window_obs = moments .rolling_sum (self ._time_obs_count > 0 ,
1201
- self ._window , min_periods = 1 )
1200
+ window_obs = (Series (self ._time_obs_count > 0 )
1201
+ .rolling (self ._window , min_periods = 1 )
1202
+ .sum ()
1203
+ .values
1204
+ )
1202
1205
1203
1206
window_obs [np .isnan (window_obs )] = 0
1204
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
1214
- result = moments .rolling_sum (self ._time_obs_count , window ,
1215
- min_periods = 1 )
1217
+ result = Series (self ._time_obs_count ).rolling (window , min_periods = 1 ).sum ().values
1216
1218
1217
1219
return result .astype (int )
1218
1220
You can’t perform that action at this time.
0 commit comments