|
| 1 | +from typing import ( |
| 2 | + Any, |
| 3 | + Callable, |
| 4 | + Literal, |
| 5 | +) |
| 6 | + |
| 7 | +import numpy as np |
| 8 | + |
| 9 | +def roll_sum( |
| 10 | + values: np.ndarray, # const float64_t[:] |
| 11 | + start: np.ndarray, # np.ndarray[np.int64] |
| 12 | + end: np.ndarray, # np.ndarray[np.int64] |
| 13 | + minp: int, # int64_t |
| 14 | +) -> np.ndarray: ... # np.ndarray[float] |
| 15 | + |
| 16 | +def roll_mean( |
| 17 | + values: np.ndarray, # const float64_t[:] |
| 18 | + start: np.ndarray, # np.ndarray[np.int64] |
| 19 | + end: np.ndarray, # np.ndarray[np.int64] |
| 20 | + minp: int, # int64_t |
| 21 | +) -> np.ndarray: ... # np.ndarray[float] |
| 22 | + |
| 23 | +def roll_var( |
| 24 | + values: np.ndarray, # const float64_t[:] |
| 25 | + start: np.ndarray, # np.ndarray[np.int64] |
| 26 | + end: np.ndarray, # np.ndarray[np.int64] |
| 27 | + minp: int, # int64_t |
| 28 | + ddof: int = ..., |
| 29 | +) -> np.ndarray: ... # np.ndarray[float] |
| 30 | + |
| 31 | +def roll_skew( |
| 32 | + values: np.ndarray, # np.ndarray[np.float64] |
| 33 | + start: np.ndarray, # np.ndarray[np.int64] |
| 34 | + end: np.ndarray, # np.ndarray[np.int64] |
| 35 | + minp: int, # int64_t |
| 36 | +) -> np.ndarray: ... # np.ndarray[float] |
| 37 | + |
| 38 | +def roll_kurt( |
| 39 | + values: np.ndarray, # np.ndarray[np.float64] |
| 40 | + start: np.ndarray, # np.ndarray[np.int64] |
| 41 | + end: np.ndarray, # np.ndarray[np.int64] |
| 42 | + minp: int, # int64_t |
| 43 | +) -> np.ndarray: ... # np.ndarray[float] |
| 44 | + |
| 45 | +def roll_median_c( |
| 46 | + values: np.ndarray, # np.ndarray[np.float64] |
| 47 | + start: np.ndarray, # np.ndarray[np.int64] |
| 48 | + end: np.ndarray, # np.ndarray[np.int64] |
| 49 | + minp: int, # int64_t |
| 50 | +) -> np.ndarray: ... # np.ndarray[float] |
| 51 | + |
| 52 | +def roll_max( |
| 53 | + values: np.ndarray, # np.ndarray[np.float64] |
| 54 | + start: np.ndarray, # np.ndarray[np.int64] |
| 55 | + end: np.ndarray, # np.ndarray[np.int64] |
| 56 | + minp: int, # int64_t |
| 57 | +) -> np.ndarray: ... # np.ndarray[float] |
| 58 | + |
| 59 | +def roll_min( |
| 60 | + values: np.ndarray, # np.ndarray[np.float64] |
| 61 | + start: np.ndarray, # np.ndarray[np.int64] |
| 62 | + end: np.ndarray, # np.ndarray[np.int64] |
| 63 | + minp: int, # int64_t |
| 64 | +) -> np.ndarray: ... # np.ndarray[float] |
| 65 | + |
| 66 | +def roll_quantile( |
| 67 | + values: np.ndarray, # const float64_t[:] |
| 68 | + start: np.ndarray, # np.ndarray[np.int64] |
| 69 | + end: np.ndarray, # np.ndarray[np.int64] |
| 70 | + minp: int, # int64_t |
| 71 | + quantile: float, # float64_t |
| 72 | + interpolation: Literal["linear", "lower", "higher", "nearest", "midpoint"], |
| 73 | +) -> np.ndarray: ... # np.ndarray[float] |
| 74 | + |
| 75 | +def roll_apply( |
| 76 | + obj: object, |
| 77 | + start: np.ndarray, # np.ndarray[np.int64] |
| 78 | + end: np.ndarray, # np.ndarray[np.int64] |
| 79 | + minp: int, # int64_t |
| 80 | + function: Callable[..., Any], |
| 81 | + raw: bool, |
| 82 | + args: tuple[Any, ...], |
| 83 | + kwargs: dict[str, Any], |
| 84 | +) -> np.ndarray: ... # np.ndarray[float] # FIXME: could also be type(obj) if n==0 |
| 85 | + |
| 86 | +def roll_weighted_sum( |
| 87 | + values: np.ndarray, # const float64_t[:] |
| 88 | + weights: np.ndarray, # const float64_t[:] |
| 89 | + minp: int, |
| 90 | +) -> np.ndarray: ... # np.ndarray[np.float64] |
| 91 | + |
| 92 | +def roll_weighted_mean( |
| 93 | + values: np.ndarray, # const float64_t[:] |
| 94 | + weights: np.ndarray, # const float64_t[:] |
| 95 | + minp: int, |
| 96 | +) -> np.ndarray: ... # np.ndarray[np.float64] |
| 97 | + |
| 98 | +def roll_weighted_var( |
| 99 | + values: np.ndarray, # const float64_t[:] |
| 100 | + weights: np.ndarray, # const float64_t[:] |
| 101 | + minp: int, # int64_t |
| 102 | + ddof: int, # unsigned int |
| 103 | +) -> np.ndarray: ... # np.ndarray[np.float64] |
| 104 | + |
| 105 | +def ewma( |
| 106 | + vals: np.ndarray, # const float64_t[:] |
| 107 | + start: np.ndarray, # const int64_t[:] |
| 108 | + end: np.ndarray, # const int64_t[:] |
| 109 | + minp: int, |
| 110 | + com: float, # float64_t |
| 111 | + adjust: bool, |
| 112 | + ignore_na: bool, |
| 113 | + deltas: np.ndarray, # const float64_t[:] |
| 114 | +) -> np.ndarray: ... # np.ndarray[np.float64] |
| 115 | + |
| 116 | +def ewmcov( |
| 117 | + input_x: np.ndarray, # const float64_t[:] |
| 118 | + start: np.ndarray, # const int64_t[:] |
| 119 | + end: np.ndarray, # const int64_t[:] |
| 120 | + minp: int, |
| 121 | + input_y: np.ndarray, # const float64_t[:] |
| 122 | + com: float, # float64_t |
| 123 | + adjust: bool, |
| 124 | + ignore_na: bool, |
| 125 | + bias: bool, |
| 126 | +) -> np.ndarray: ... # np.ndarray[np.float64] |
0 commit comments