@@ -838,9 +838,9 @@ cdef inline kth_smallest_c(float64_t* a, Py_ssize_t k, Py_ssize_t n):
838838
839839
840840cpdef numeric median(numeric[:] arr):
841- '''
841+ """
842842 A faster median
843- '''
843+ """
844844 cdef Py_ssize_t n = arr.size
845845
846846 if n == 0 :
@@ -999,7 +999,7 @@ def roll_mean(ndarray[double_t] input,
999999# Exponentially weighted moving average
10001000
10011001def ewma (ndarray[double_t] input , double_t com , int adjust , int ignore_na , int minp ):
1002- '''
1002+ """
10031003 Compute exponentially-weighted moving average using center-of-mass.
10041004
10051005 Parameters
@@ -1013,7 +1013,7 @@ def ewma(ndarray[double_t] input, double_t com, int adjust, int ignore_na, int m
10131013 Returns
10141014 -------
10151015 y : ndarray
1016- '''
1016+ """
10171017
10181018 cdef Py_ssize_t N = len (input )
10191019 cdef ndarray[double_t] output = np.empty(N, dtype = float )
@@ -1061,7 +1061,7 @@ def ewma(ndarray[double_t] input, double_t com, int adjust, int ignore_na, int m
10611061
10621062def ewmcov (ndarray[double_t] input_x , ndarray[double_t] input_y ,
10631063 double_t com , int adjust , int ignore_na , int minp , int bias ):
1064- '''
1064+ """
10651065 Compute exponentially-weighted moving variance using center-of-mass.
10661066
10671067 Parameters
@@ -1077,7 +1077,7 @@ def ewmcov(ndarray[double_t] input_x, ndarray[double_t] input_y,
10771077 Returns
10781078 -------
10791079 y : ndarray
1080- '''
1080+ """
10811081
10821082 cdef Py_ssize_t N = len (input_x)
10831083 if len (input_y) != N:
@@ -1761,9 +1761,9 @@ cdef _roll_min_max(ndarray[numeric] a, int window, int minp, bint is_max):
17611761
17621762def roll_quantile (ndarray[float64_t , cast = True ] input , int win ,
17631763 int minp , double quantile ):
1764- '''
1764+ """
17651765 O(N log(window)) implementation using skip list
1766- '''
1766+ """
17671767 cdef double val, prev, midpoint
17681768 cdef IndexableSkiplist skiplist
17691769 cdef Py_ssize_t nobs = 0 , i
@@ -1997,12 +1997,12 @@ def groupby_indices(ndarray values):
19971997@ cython.wraparound (False )
19981998@ cython.boundscheck (False )
19991999def group_labels (ndarray[object] values ):
2000- '''
2000+ """
20012001 Compute label vector from input values and associated useful data
20022002
20032003 Returns
20042004 -------
2005- '''
2005+ """
20062006 cdef:
20072007 Py_ssize_t i, n = len (values)
20082008 ndarray[int64_t] labels = np.empty(n, dtype = np.int64)
@@ -2074,9 +2074,9 @@ def group_nth_object(ndarray[object, ndim=2] out,
20742074 ndarray[object , ndim = 2 ] values,
20752075 ndarray[int64_t] labels ,
20762076 int64_t rank ):
2077- '''
2077+ """
20782078 Only aggregates on axis=0
2079- '''
2079+ """
20802080 cdef:
20812081 Py_ssize_t i, j, N, K, lab
20822082 object val
@@ -2117,9 +2117,9 @@ def group_nth_bin_object(ndarray[object, ndim=2] out,
21172117 ndarray[int64_t] counts ,
21182118 ndarray[object , ndim = 2 ] values,
21192119 ndarray[int64_t] bins , int64_t rank ):
2120- '''
2120+ """
21212121 Only aggregates on axis=0
2122- '''
2122+ """
21232123 cdef:
21242124 Py_ssize_t i, j, N, K, ngroups, b
21252125 object val
@@ -2167,9 +2167,9 @@ def group_last_object(ndarray[object, ndim=2] out,
21672167 ndarray[int64_t] counts ,
21682168 ndarray[object , ndim = 2 ] values,
21692169 ndarray[int64_t] labels ):
2170- '''
2170+ """
21712171 Only aggregates on axis=0
2172- '''
2172+ """
21732173 cdef:
21742174 Py_ssize_t i, j, N, K, lab
21752175 object val
@@ -2209,9 +2209,9 @@ def group_last_bin_object(ndarray[object, ndim=2] out,
22092209 ndarray[int64_t] counts ,
22102210 ndarray[object , ndim = 2 ] values,
22112211 ndarray[int64_t] bins ):
2212- '''
2212+ """
22132213 Only aggregates on axis=0
2214- '''
2214+ """
22152215 cdef:
22162216 Py_ssize_t i, j, N, K, ngroups, b
22172217 object val
0 commit comments