@@ -106,7 +106,7 @@ def group_median_float64(ndarray[float64_t, ndim=2] out,
106
106
ndarray[int64_t] counts ,
107
107
ndarray[float64_t , ndim = 2 ] values,
108
108
ndarray[intp_t] labels ,
109
- Py_ssize_t min_count = - 1 ):
109
+ Py_ssize_t min_count = - 1 ) -> None :
110
110
"""
111
111
Only aggregates on axis = 0
112
112
"""
@@ -148,7 +148,7 @@ def group_cumprod_float64(float64_t[:, ::1] out,
148
148
const intp_t[:] labels ,
149
149
int ngroups ,
150
150
bint is_datetimelike ,
151
- bint skipna = True ):
151
+ bint skipna = True ) -> None :
152
152
"""
153
153
Cumulative product of columns of `values`, in row groups `labels`.
154
154
@@ -205,7 +205,7 @@ def group_cumsum(numeric[:, ::1] out,
205
205
const intp_t[:] labels ,
206
206
int ngroups ,
207
207
is_datetimelike ,
208
- bint skipna = True ):
208
+ bint skipna = True ) -> None :
209
209
"""
210
210
Cumulative sum of columns of `values`, in row groups `labels`.
211
211
@@ -270,7 +270,7 @@ def group_cumsum(numeric[:, ::1] out,
270
270
@ cython.boundscheck (False )
271
271
@ cython.wraparound (False )
272
272
def group_shift_indexer (int64_t[::1] out , const intp_t[:] labels ,
273
- int ngroups , int periods ):
273
+ int ngroups , int periods ) -> None :
274
274
cdef:
275
275
Py_ssize_t N , i , j , ii , lab
276
276
int offset = 0 , sign
@@ -322,14 +322,14 @@ def group_shift_indexer(int64_t[::1] out, const intp_t[:] labels,
322
322
@ cython.wraparound (False )
323
323
@ cython.boundscheck (False )
324
324
def group_fillna_indexer (ndarray[int64_t] out , ndarray[intp_t] labels ,
325
- ndarray[uint8_t] mask , object direction ,
326
- int64_t limit , bint dropna ):
325
+ ndarray[uint8_t] mask , str direction ,
326
+ int64_t limit , bint dropna ) -> None :
327
327
"""
328
328
Indexes how to fill values forwards or backwards within a group.
329
329
330
330
Parameters
331
331
----------
332
- out : np.ndarray[np.uint8 ]
332
+ out : np.ndarray[np.int64 ]
333
333
Values into which this method will write its results.
334
334
labels : np.ndarray[np.intp]
335
335
Array containing unique label for each group , with its ordering
@@ -392,8 +392,8 @@ def group_any_all(uint8_t[::1] out,
392
392
const uint8_t[::1] values ,
393
393
const intp_t[:] labels ,
394
394
const uint8_t[::1] mask ,
395
- object val_test ,
396
- bint skipna ):
395
+ str val_test ,
396
+ bint skipna ) -> None :
397
397
"""
398
398
Aggregated boolean values to show truthfulness of group elements.
399
399
@@ -465,7 +465,7 @@ def group_add(complexfloating_t[:, ::1] out,
465
465
int64_t[::1] counts ,
466
466
ndarray[complexfloating_t , ndim = 2 ] values,
467
467
const intp_t[:] labels ,
468
- Py_ssize_t min_count = 0 ):
468
+ Py_ssize_t min_count = 0 ) -> None :
469
469
"""
470
470
Only aggregates on axis = 0 using Kahan summation
471
471
"""
@@ -518,7 +518,7 @@ def group_prod(floating[:, ::1] out,
518
518
int64_t[::1] counts ,
519
519
ndarray[floating , ndim = 2 ] values,
520
520
const intp_t[:] labels ,
521
- Py_ssize_t min_count = 0 ):
521
+ Py_ssize_t min_count = 0 ) -> None :
522
522
"""
523
523
Only aggregates on axis = 0
524
524
"""
@@ -568,7 +568,7 @@ def group_var(floating[:, ::1] out,
568
568
ndarray[floating , ndim = 2 ] values,
569
569
const intp_t[:] labels ,
570
570
Py_ssize_t min_count = - 1 ,
571
- int64_t ddof = 1 ):
571
+ int64_t ddof = 1 ) -> None :
572
572
cdef:
573
573
Py_ssize_t i , j , N , K , lab , ncounts = len (counts)
574
574
floating val , ct , oldmean
@@ -621,7 +621,7 @@ def group_mean(floating[:, ::1] out,
621
621
int64_t[::1] counts ,
622
622
ndarray[floating , ndim = 2 ] values,
623
623
const intp_t[::1] labels ,
624
- Py_ssize_t min_count = - 1 ):
624
+ Py_ssize_t min_count = - 1 ) -> None :
625
625
cdef:
626
626
Py_ssize_t i , j , N , K , lab , ncounts = len (counts)
627
627
floating val , count , y , t
@@ -673,7 +673,7 @@ def group_ohlc(floating[:, ::1] out,
673
673
int64_t[::1] counts ,
674
674
ndarray[floating , ndim = 2 ] values,
675
675
const intp_t[:] labels ,
676
- Py_ssize_t min_count = - 1 ):
676
+ Py_ssize_t min_count = - 1 ) -> None :
677
677
"""
678
678
Only aggregates on axis = 0
679
679
"""
@@ -721,7 +721,7 @@ def group_quantile(ndarray[float64_t] out,
721
721
ndarray[intp_t] labels ,
722
722
ndarray[uint8_t] mask ,
723
723
float64_t q ,
724
- object interpolation ):
724
+ str interpolation ) -> None :
725
725
"""
726
726
Calculate the quantile per group.
727
727
@@ -733,8 +733,6 @@ def group_quantile(ndarray[float64_t] out,
733
733
Array containing the values to apply the function against.
734
734
labels : ndarray[np.intp]
735
735
Array containing the unique group labels.
736
- values : ndarray
737
- Array containing the values to apply the function against.
738
736
q : float
739
737
The quantile value to search for.
740
738
interpolation : {'linear', 'lower', 'highest', 'nearest', 'midpoint'}
@@ -865,7 +863,7 @@ def group_last(rank_t[:, ::1] out,
865
863
int64_t[::1] counts ,
866
864
ndarray[rank_t , ndim = 2 ] values,
867
865
const intp_t[:] labels ,
868
- Py_ssize_t min_count = - 1 ):
866
+ Py_ssize_t min_count = - 1 ) -> None :
869
867
"""
870
868
Only aggregates on axis = 0
871
869
"""
@@ -957,8 +955,9 @@ def group_nth(rank_t[:, ::1] out,
957
955
int64_t[::1] counts ,
958
956
ndarray[rank_t , ndim = 2 ] values,
959
957
const intp_t[:] labels ,
960
- int64_t min_count = - 1 , int64_t rank = 1
961
- ):
958
+ int64_t min_count = - 1 ,
959
+ int64_t rank = 1 ,
960
+ ) -> None:
962
961
"""
963
962
Only aggregates on axis = 0
964
963
"""
@@ -1050,8 +1049,8 @@ def group_rank(float64_t[:, ::1] out,
1050
1049
ndarray[rank_t , ndim = 2 ] values,
1051
1050
const intp_t[:] labels ,
1052
1051
int ngroups ,
1053
- bint is_datetimelike , object ties_method = " average" ,
1054
- bint ascending = True , bint pct = False , object na_option = " keep" ):
1052
+ bint is_datetimelike , str ties_method = " average" ,
1053
+ bint ascending = True , bint pct = False , str na_option = " keep" ) -> None :
1055
1054
"""
1056
1055
Provides the rank of values within each group.
1057
1056
@@ -1221,7 +1220,7 @@ def group_max(groupby_t[:, ::1] out,
1221
1220
int64_t[::1] counts ,
1222
1221
ndarray[groupby_t , ndim = 2 ] values,
1223
1222
const intp_t[:] labels ,
1224
- Py_ssize_t min_count = - 1 ):
1223
+ Py_ssize_t min_count = - 1 ) -> None :
1225
1224
"""See group_min_max.__doc__"""
1226
1225
group_min_max(out , counts , values , labels , min_count = min_count, compute_max = True )
1227
1226
@@ -1232,7 +1231,7 @@ def group_min(groupby_t[:, ::1] out,
1232
1231
int64_t[::1] counts ,
1233
1232
ndarray[groupby_t , ndim = 2 ] values,
1234
1233
const intp_t[:] labels ,
1235
- Py_ssize_t min_count = - 1 ):
1234
+ Py_ssize_t min_count = - 1 ) -> None :
1236
1235
"""See group_min_max.__doc__"""
1237
1236
group_min_max(out , counts , values , labels , min_count = min_count, compute_max = False )
1238
1237
@@ -1311,7 +1310,7 @@ def group_cummin(groupby_t[:, ::1] out,
1311
1310
ndarray[groupby_t , ndim = 2 ] values,
1312
1311
const intp_t[:] labels ,
1313
1312
int ngroups ,
1314
- bint is_datetimelike ):
1313
+ bint is_datetimelike ) -> None :
1315
1314
"""See group_cummin_max.__doc__"""
1316
1315
group_cummin_max(out , values , labels , ngroups , is_datetimelike , compute_max = False )
1317
1316
@@ -1322,6 +1321,6 @@ def group_cummax(groupby_t[:, ::1] out,
1322
1321
ndarray[groupby_t , ndim = 2 ] values,
1323
1322
const intp_t[:] labels ,
1324
1323
int ngroups ,
1325
- bint is_datetimelike ):
1324
+ bint is_datetimelike ) -> None :
1326
1325
"""See group_cummin_max.__doc__"""
1327
1326
group_cummin_max(out , values , labels , ngroups , is_datetimelike , compute_max = True )
0 commit comments