@@ -136,7 +136,7 @@ cdef inline void remove_sum(float64_t val, int64_t *nobs, float64_t *sum_x,
136
136
sum_x[0 ] = t
137
137
138
138
139
- def roll_sum (ndarray[ float64_t] values , ndarray[int64_t] start ,
139
+ def roll_sum (const float64_t[: ] values , ndarray[int64_t] start ,
140
140
ndarray[int64_t] end , int64_t minp ):
141
141
cdef:
142
142
float64_t sum_x = 0 , compensation_add = 0 , compensation_remove = 0
@@ -240,7 +240,7 @@ cdef inline void remove_mean(float64_t val, Py_ssize_t *nobs, float64_t *sum_x,
240
240
neg_ct[0 ] = neg_ct[0 ] - 1
241
241
242
242
243
- def roll_mean (ndarray[ float64_t] values , ndarray[int64_t] start ,
243
+ def roll_mean (const float64_t[: ] values , ndarray[int64_t] start ,
244
244
ndarray[int64_t] end , int64_t minp ):
245
245
cdef:
246
246
float64_t val, compensation_add = 0 , compensation_remove = 0 , sum_x = 0
@@ -361,7 +361,7 @@ cdef inline void remove_var(float64_t val, float64_t *nobs, float64_t *mean_x,
361
361
ssqdm_x[0 ] = 0
362
362
363
363
364
- def roll_var (ndarray[ float64_t] values , ndarray[int64_t] start ,
364
+ def roll_var (const float64_t[: ] values , ndarray[int64_t] start ,
365
365
ndarray[int64_t] end , int64_t minp , int ddof = 1 ):
366
366
"""
367
367
Numerically stable implementation using Welford's method.
@@ -772,7 +772,7 @@ def roll_kurt(ndarray[float64_t] values, ndarray[int64_t] start,
772
772
# Rolling median, min, max
773
773
774
774
775
- def roll_median_c (ndarray[ float64_t] values , ndarray[int64_t] start ,
775
+ def roll_median_c (const float64_t[: ] values , ndarray[int64_t] start ,
776
776
ndarray[int64_t] end , int64_t minp ):
777
777
# GH 32865. win argument kept for compatibility
778
778
cdef:
@@ -1032,7 +1032,7 @@ interpolation_types = {
1032
1032
}
1033
1033
1034
1034
1035
- def roll_quantile (ndarray[ float64_t , cast = True ] values, ndarray[int64_t] start ,
1035
+ def roll_quantile (const float64_t[: ] values , ndarray[int64_t] start ,
1036
1036
ndarray[int64_t] end , int64_t minp ,
1037
1037
float64_t quantile , str interpolation ):
1038
1038
"""
0 commit comments