File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 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(
218218 start , end = indexer .get_window_bounds (
219219 len (indicies ), min_periods , center , closed
220220 )
221+ start = start .astype (np .int64 )
222+ end = end .astype (np .int64 )
221223 # Cannot use groupby_indicies as they might not be monotonic with the object
222224 # we're rolling over
223225 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 ),
227227 )
228228 window_indicies_start += len (indicies )
229229 # 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 )
231233 start_arrays .append (window_indicies .take (start ))
232234 end_arrays .append (window_indicies .take (end ))
233235 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):
22282228 """
22292229 # Ensure the object we're rolling over is monotonically sorted relative
22302230 # 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 )
22322235 return super ()._create_blocks (obj )
22332236
22342237 def _get_cython_func_type (self , func : str ) -> Callable :
You can’t perform that action at this time.
0 commit comments