@@ -38,8 +38,15 @@ cimport pandas._libs.util as util
38
38
from pandas._libs.util cimport numeric, get_nat
39
39
40
40
from pandas._libs.khash cimport (
41
- khiter_t, kh_destroy_int64, kh_put_int64, kh_init_int64, kh_int64_t,
42
- kh_resize_int64, kh_get_int64)
41
+ kh_destroy_int64,
42
+ kh_get_int64,
43
+ kh_init_int64,
44
+ kh_int64_t,
45
+ kh_put_int64,
46
+ kh_resize_int64,
47
+ khiter_t,
48
+ )
49
+
43
50
44
51
import pandas._libs.missing as missing
45
52
@@ -791,8 +798,13 @@ ctypedef fused rank_t:
791
798
792
799
@ cython.wraparound (False )
793
800
@ cython.boundscheck (False )
794
- def rank_1d (rank_t[:] in_arr , ties_method = ' average' ,
795
- ascending = True , na_option = ' keep' , pct = False ):
801
+ def rank_1d (
802
+ rank_t[:] in_arr ,
803
+ ties_method = " average" ,
804
+ bint ascending = True ,
805
+ na_option = " keep" ,
806
+ bint pct = False ,
807
+ ):
796
808
"""
797
809
Fast NaN-friendly version of ``scipy.stats.rankdata``.
798
810
"""
@@ -1009,8 +1021,14 @@ def rank_1d(rank_t[:] in_arr, ties_method='average',
1009
1021
return ranks
1010
1022
1011
1023
1012
- def rank_2d (rank_t[:, :] in_arr , axis = 0 , ties_method = ' average' ,
1013
- ascending = True , na_option = ' keep' , pct = False ):
1024
+ def rank_2d (
1025
+ rank_t[:, :] in_arr ,
1026
+ int axis = 0 ,
1027
+ ties_method = " average" ,
1028
+ bint ascending = True ,
1029
+ na_option = " keep" ,
1030
+ bint pct = False ,
1031
+ ):
1014
1032
"""
1015
1033
Fast NaN-friendly version of ``scipy.stats.rankdata``.
1016
1034
"""
@@ -1190,9 +1208,12 @@ ctypedef fused out_t:
1190
1208
1191
1209
@ cython.boundscheck (False )
1192
1210
@ cython.wraparound (False )
1193
- def diff_2d (diff_t[:, :] arr ,
1194
- out_t[:, :] out ,
1195
- Py_ssize_t periods , int axis ):
1211
+ def diff_2d (
1212
+ diff_t[:, :] arr ,
1213
+ out_t[:, :] out ,
1214
+ Py_ssize_t periods ,
1215
+ int axis ,
1216
+ ):
1196
1217
cdef:
1197
1218
Py_ssize_t i, j, sx, sy, start, stop
1198
1219
bint f_contig = arr.is_f_contig()
0 commit comments