File tree 2 files changed +10
-5
lines changed
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -218,16 +218,18 @@ def get_window_bounds(
218
218
start , end = indexer .get_window_bounds (
219
219
len (indicies ), min_periods , center , closed
220
220
)
221
+ start = start .astype (np .int64 )
222
+ end = end .astype (np .int64 )
221
223
# Cannot use groupby_indicies as they might not be monotonic with the object
222
224
# we're rolling over
223
225
window_indicies = np .arange (
224
- window_indicies_start ,
225
- window_indicies_start + len (indicies ),
226
- dtype = np .int64 ,
226
+ window_indicies_start , window_indicies_start + len (indicies ),
227
227
)
228
228
window_indicies_start += len (indicies )
229
229
# Extend as we'll be slicing window like [start, end)
230
- window_indicies = np .append (window_indicies , [window_indicies [- 1 ] + 1 ])
230
+ window_indicies = np .append (
231
+ window_indicies , [window_indicies [- 1 ] + 1 ]
232
+ ).astype (np .int64 )
231
233
start_arrays .append (window_indicies .take (start ))
232
234
end_arrays .append (window_indicies .take (end ))
233
235
start = np .concatenate (start_arrays )
Original file line number Diff line number Diff line change @@ -2228,7 +2228,10 @@ def _create_blocks(self, obj: FrameOrSeries):
2228
2228
"""
2229
2229
# Ensure the object we're rolling over is monotonically sorted relative
2230
2230
# to the groups
2231
- obj = obj .take (np .concatenate (list (self ._groupby .grouper .indices .values ())))
2231
+ groupby_order = np .concatenate (
2232
+ list (self ._groupby .grouper .indices .values ())
2233
+ ).astype (np .int64 )
2234
+ obj = obj .take (groupby_order )
2232
2235
return super ()._create_blocks (obj )
2233
2236
2234
2237
def _get_cython_func_type (self , func : str ) -> Callable :
You can’t perform that action at this time.
0 commit comments