@@ -838,9 +838,9 @@ cdef inline kth_smallest_c(float64_t* a, Py_ssize_t k, Py_ssize_t n):
838
838
839
839
840
840
cpdef numeric median(numeric[:] arr):
841
- '''
841
+ """
842
842
A faster median
843
- '''
843
+ """
844
844
cdef Py_ssize_t n = arr.size
845
845
846
846
if n == 0 :
@@ -999,7 +999,7 @@ def roll_mean(ndarray[double_t] input,
999
999
# Exponentially weighted moving average
1000
1000
1001
1001
def ewma (ndarray[double_t] input , double_t com , int adjust , int ignore_na , int minp ):
1002
- '''
1002
+ """
1003
1003
Compute exponentially-weighted moving average using center-of-mass.
1004
1004
1005
1005
Parameters
@@ -1013,7 +1013,7 @@ def ewma(ndarray[double_t] input, double_t com, int adjust, int ignore_na, int m
1013
1013
Returns
1014
1014
-------
1015
1015
y : ndarray
1016
- '''
1016
+ """
1017
1017
1018
1018
cdef Py_ssize_t N = len (input )
1019
1019
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
1061
1061
1062
1062
def ewmcov (ndarray[double_t] input_x , ndarray[double_t] input_y ,
1063
1063
double_t com , int adjust , int ignore_na , int minp , int bias ):
1064
- '''
1064
+ """
1065
1065
Compute exponentially-weighted moving variance using center-of-mass.
1066
1066
1067
1067
Parameters
@@ -1077,7 +1077,7 @@ def ewmcov(ndarray[double_t] input_x, ndarray[double_t] input_y,
1077
1077
Returns
1078
1078
-------
1079
1079
y : ndarray
1080
- '''
1080
+ """
1081
1081
1082
1082
cdef Py_ssize_t N = len (input_x)
1083
1083
if len (input_y) != N:
@@ -1761,9 +1761,9 @@ cdef _roll_min_max(ndarray[numeric] a, int window, int minp, bint is_max):
1761
1761
1762
1762
def roll_quantile (ndarray[float64_t , cast = True ] input , int win ,
1763
1763
int minp , double quantile ):
1764
- '''
1764
+ """
1765
1765
O(N log(window)) implementation using skip list
1766
- '''
1766
+ """
1767
1767
cdef double val, prev, midpoint
1768
1768
cdef IndexableSkiplist skiplist
1769
1769
cdef Py_ssize_t nobs = 0 , i
@@ -1997,12 +1997,12 @@ def groupby_indices(ndarray values):
1997
1997
@ cython.wraparound (False )
1998
1998
@ cython.boundscheck (False )
1999
1999
def group_labels (ndarray[object] values ):
2000
- '''
2000
+ """
2001
2001
Compute label vector from input values and associated useful data
2002
2002
2003
2003
Returns
2004
2004
-------
2005
- '''
2005
+ """
2006
2006
cdef:
2007
2007
Py_ssize_t i, n = len (values)
2008
2008
ndarray[int64_t] labels = np.empty(n, dtype = np.int64)
@@ -2074,9 +2074,9 @@ def group_nth_object(ndarray[object, ndim=2] out,
2074
2074
ndarray[object , ndim = 2 ] values,
2075
2075
ndarray[int64_t] labels ,
2076
2076
int64_t rank ):
2077
- '''
2077
+ """
2078
2078
Only aggregates on axis=0
2079
- '''
2079
+ """
2080
2080
cdef:
2081
2081
Py_ssize_t i, j, N, K, lab
2082
2082
object val
@@ -2117,9 +2117,9 @@ def group_nth_bin_object(ndarray[object, ndim=2] out,
2117
2117
ndarray[int64_t] counts ,
2118
2118
ndarray[object , ndim = 2 ] values,
2119
2119
ndarray[int64_t] bins , int64_t rank ):
2120
- '''
2120
+ """
2121
2121
Only aggregates on axis=0
2122
- '''
2122
+ """
2123
2123
cdef:
2124
2124
Py_ssize_t i, j, N, K, ngroups, b
2125
2125
object val
@@ -2167,9 +2167,9 @@ def group_last_object(ndarray[object, ndim=2] out,
2167
2167
ndarray[int64_t] counts ,
2168
2168
ndarray[object , ndim = 2 ] values,
2169
2169
ndarray[int64_t] labels ):
2170
- '''
2170
+ """
2171
2171
Only aggregates on axis=0
2172
- '''
2172
+ """
2173
2173
cdef:
2174
2174
Py_ssize_t i, j, N, K, lab
2175
2175
object val
@@ -2209,9 +2209,9 @@ def group_last_bin_object(ndarray[object, ndim=2] out,
2209
2209
ndarray[int64_t] counts ,
2210
2210
ndarray[object , ndim = 2 ] values,
2211
2211
ndarray[int64_t] bins ):
2212
- '''
2212
+ """
2213
2213
Only aggregates on axis=0
2214
- '''
2214
+ """
2215
2215
cdef:
2216
2216
Py_ssize_t i, j, N, K, ngroups, b
2217
2217
object val
0 commit comments