@@ -907,16 +907,14 @@ def group_cumsum(numeric[:, :] out,
907
907
@cython.boundscheck(False)
908
908
@cython.wraparound(False)
909
909
def group_shift_indexer(ndarray[int64_t] out, ndarray[int64_t] labels,
910
- int64_t ngroups, **kwargs ):
910
+ int64_t ngroups, int64_t periods ):
911
911
cdef:
912
912
Py_ssize_t N, i, j, ii
913
- int offset, sign, periods
913
+ int offset, sign
914
914
int64_t lab, idxer, idxer_slot
915
915
int64_t[:] label_seen = np.zeros(ngroups, dtype=np.int64)
916
916
int64_t[:, :] label_indexer
917
917
918
- periods = kwargs['periods']
919
-
920
918
N, = (<object> labels).shape
921
919
922
920
if periods < 0:
@@ -960,7 +958,8 @@ def group_shift_indexer(ndarray[int64_t] out, ndarray[int64_t] labels,
960
958
@cython.wraparound(False)
961
959
@cython.boundscheck(False)
962
960
def group_fillna_indexer(ndarray[int64_t] out, ndarray[int64_t] labels,
963
- ndarray[uint8_t] mask, **kwargs):
961
+ ndarray[uint8_t] mask, object direction,
962
+ int64_t limit):
964
963
"""Indexes how to fill values forwards or backwards within a group
965
964
966
965
Parameters
@@ -981,10 +980,8 @@ def group_fillna_indexer(ndarray[int64_t] out, ndarray[int64_t] labels,
981
980
cdef:
982
981
Py_ssize_t i, N
983
982
ndarray[int64_t] sorted_labels
984
- int64_t limit, idx, curr_fill_idx=-1, filled_vals=0
983
+ int64_t idx, curr_fill_idx=-1, filled_vals=0
985
984
986
- direction = kwargs['direction']
987
- limit = kwargs['limit']
988
985
N = len(out)
989
986
990
987
# Make sure all arrays are the same size
0 commit comments