hyb
2025-11-10 e0a856b5072c5a09f3f6de6da85abf90e00ee704
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
Ë
nñúhn)ãóx—ddlmZddlZddlmZmZmZddlZddl    m
Z
ddl m Z erddl mZej                                d d„«Zej                                                                d d„«Zej                                dd    „«Zejd
„«Zej                                                                d d „«Zy)é)Ú annotationsN)Ú TYPE_CHECKINGÚAnyÚCallable)Úimport_optional_dependency)Újit_user_function)ÚScalarc󠇇—t|«ŠtrddlŠn td«Š‰j    |||¬«                                                dˆˆfd„ «}|S)a’
    Generate a numba jitted apply function specified by values from engine_kwargs.
 
    1. jit the user's function
    2. Return a rolling apply function with the jitted function inline
 
    Configurations specified in engine_kwargs apply to both the user's
    function _AND_ the rolling apply function.
 
    Parameters
    ----------
    func : function
        function to be applied to each window and will be JITed
    nopython : bool
        nopython to be passed into numba.jit
    nogil : bool
        nogil to be passed into numba.jit
    parallel : bool
        parallel to be passed into numba.jit
 
    Returns
    -------
    Numba function
    rNÚnumba©ÚnopythonÚnogilÚparallelcóR•—tjt|««}‰ jt|««D]j}||}||}|||}    tjtj
|    ««}
t|    «|
z
|k\r ‰ |    g|¢­Ž||<ŒXtj ||<Œl|S)N)ÚnpÚemptyÚlenÚprangeÚsumÚisnanÚnan) ÚvaluesÚbeginÚendÚminimum_periodsÚargsÚresultÚiÚstartÚstopÚwindowÚ    count_nanr Ú
numba_funcs            €€úLH:\Change_password\venv_build\Lib\site-packages\pandas/core/window/numba_.pyÚ
roll_applyz-generate_numba_apply_func.<locals>.roll_apply9s ø€ô—‘œ#˜e›*Ó%ˆØ—‘œc &›kÓ*ò    #ˆAؘ!‘HˆEؐq‘6ˆDؘE $Ð'ˆFÜŸ™œrŸx™x¨Ó/Ó0ˆIܐ6‹{˜YÑ&¨/Ò9Ù& vÐ5°Ò5q’    äŸF™Fq’    ð    #ðˆ ó) rú
np.ndarrayrr'rr'rÚintrrÚreturnr'©rrr rÚjit)Úfuncr rrr%r r#s     @@r$Úgenerate_numba_apply_funcr-sù€ô># 4Ó(€JÝÜä*¨7Ó3ˆà
‡YY˜¨¸€YÓAðØðàððððð    ð
ð ð
õ óBðð& Ðr&c󖇇‡‡‡‡    —trddlŠ    n td«Š    ‰    j|||¬«                                        dˆˆˆˆˆˆ    fd„ «}|S)aÍ
    Generate a numba jitted ewm mean or sum function specified by values
    from engine_kwargs.
 
    Parameters
    ----------
    nopython : bool
        nopython to be passed into numba.jit
    nogil : bool
        nogil to be passed into numba.jit
    parallel : bool
        parallel to be passed into numba.jit
    com : float
    adjust : bool
    ignore_na : bool
    deltas : tuple
    normalize : bool
 
    Returns
    -------
    Numba function
    rNr r có•—tjt|««}dd‰zz }d|z
}‰rdn|}‰jt|««D].}||}    ||}
||    |
} tjt| ««} | d} t    tj
| « «}||k\r| ntj | d<d}tdt| ««D]¡}| |}tj
|« }||z }tj
| «sL|s‰sL‰r||‰|    |zdz
zz}n|| z} |r1‰r%| |k7r|| z||zz} ‰r| ||zz } ‰r||z }n d}n
| |z } n|r|} ||k\r| ntj | |<Œ£| ||    |
Œ1|S)Nçð?ré)rrrrr(rrÚrange)rrrrrÚalphaÚ old_wt_factorÚnew_wtrrr r!Ú
sub_resultÚweightedÚnobsÚold_wtÚjÚcurÚis_observationÚadjustÚcomÚdeltasÚ    ignore_naÚ    normalizer s                   €€€€€€r$Úewmz$generate_numba_ewm_func.<locals>.ewmvs¹ø€ô—‘œ#˜f›+Ó&ˆØs˜S‘yÑ!ˆØ˜e™ ˆ Ù‘ Eˆà—‘œc %›jÓ)ó)    ,ˆAؘ!‘HˆEؐq‘6ˆDؘE $Ð'ˆFÜŸ™¤# f£+Ó.ˆJà˜a‘yˆHÜœ2Ÿ8™8 HÓ-Ð-Ó.ˆDØ(,°Ò(?™HÄRÇVÁVˆJq‰M؈Fä˜1œc &›kÓ*ò PØ˜Q‘iÜ%'§X¡X¨c£]Ð!2Ø˜Ñ&Ü—x‘x Ô)Ù%©YÙ$ð# m°v¸eÀa¹iÈ!¹mÑ7LÑ&LÑL™Fà'4°xÑ'?˜HÙ)Ù(à#+¨s¢?Ø/5¸Ñ/@À6ÈCÁ<Ñ/O HÙ'0Ø3;¸vȹÑ3O¨Ù#)Ø$*¨fÑ$4¡Fà-0¡Fà (¨C¡¡Ù#Ø"Hà,0°OÒ,C¡ÌÏɐ
˜1’ ð9 Pð<",ˆF5˜Ò ðS)    ,ðVˆ r&©
rr'rr'rr'rr(r)r'©rr rr+)
r rrr>r=r@r?rArBr s
   ````` @r$Úgenerate_numba_ewm_funcrEPssý€õBÜä*¨7Ó3ˆà
‡YY˜¨¸€YÓAð6Øð6àð6ðð6ðð    6ð
 
÷ 6ñ6óBð6ðp €Jr&c󜇇—t|«ŠtrddlŠn td«Š‰j    |||¬«                                        dˆˆfd„ «}|S)aé
    Generate a numba jitted function to apply window calculations table-wise.
 
    Func will be passed a M window size x N number of columns array, and
    must return a 1 x N number of columns array. Func is intended to operate
    row-wise, but the result will be transposed for axis=1.
 
    1. jit the user's function
    2. Return a rolling apply function with the jitted function inline
 
    Parameters
    ----------
    func : function
        function to be applied to each window and will be JITed
    nopython : bool
        nopython to be passed into numba.jit
    nogil : bool
        nogil to be passed into numba.jit
    parallel : bool
        parallel to be passed into numba.jit
 
    Returns
    -------
    Numba function
    rNr r cóò•—tjt|«|jdf«}tj|j«}‰j    t|««D]g}||}||}    |||    }
tj
tj |
«d¬«} ‰|
g|¢­Ž} t|
«| z
|k\} | ||dd…f<| ||dd…f<Œitj||tj«}|S)Nr1r)Úaxis)    rrrÚshaperrrÚwherer)rrrrrrÚmin_periods_maskrrr r!r"r6Únan_maskr r#s              €€r$Ú
roll_tablez-generate_numba_table_func.<locals>.roll_tableØsæø€ô—‘œ3˜u›: v§|¡|°A¡Ð7Ó8ˆÜŸ8™8 F§L¡LÓ1ÐØ—‘œc &›kÓ*ò    &ˆAؘ!‘HˆEؐq‘6ˆDؘE $Ð'ˆFÜŸ™œrŸx™x¨Ó/°aÔ8ˆIÙ# FÐ2¨TÒ2ˆJܘ6“{ YÑ.°/ÑAˆHØ%-Ð ˜Q¢˜TÑ "Ø%ˆF1’a4ŠLð    &ô—‘Ð*¨F´B·F±FÓ;ˆØˆ r&)
rr'rr'rr'rr(rrr*)r,r rrrMr r#s     @@r$Úgenerate_numba_table_funcrN²sxù€ô@# 4Ó(€JÝÜä*¨7Ó3ˆà
‡YY˜¨¸€YÓAðØðàððððð    ð
õ óBðð* Ðr&cóp‡‡—trddlŠn td«Š‰jddd¬«ˆˆfd„«}|S)Nrr Tr c󺕗tj|jd«}‰j|jd«D]}|dd…|f}‰|«||<Œ|S)Nr1)rrrIr)ÚtablerrÚ    partitionÚnan_funcr s    €€r$Únan_agg_with_axiszBgenerate_manual_numpy_nan_agg_with_axis.<locals>.nan_agg_with_axisûs[ø€ä—‘˜%Ÿ+™+ a™.Ó)ˆØ—‘˜eŸk™k¨!™nÓ-ò    ,ˆAØša ˜d™ ˆIÙ  Ó+ˆF1ŠIð    ,ðˆ r&rD)rSrTr s` @r$Ú'generate_manual_numpy_nan_agg_with_axisrUôs<ù€åÜä*¨7Ó3ˆà
‡YY˜ D°4€YÓ8ôó9ðð Ðr&c󖇇‡‡‡‡    —trddlŠ    n td«Š    ‰    j|||¬«                                        dˆˆˆˆˆˆ    fd„ «}|S)aß
    Generate a numba jitted ewm mean or sum function applied table wise specified
    by values from engine_kwargs.
 
    Parameters
    ----------
    nopython : bool
        nopython to be passed into numba.jit
    nogil : bool
        nogil to be passed into numba.jit
    parallel : bool
        parallel to be passed into numba.jit
    com : float
    adjust : bool
    ignore_na : bool
    deltas : tuple
    normalize: bool
 
    Returns
    -------
    Numba function
    rNr r c    óD•—dd‰zz }d|z
}‰rdn|}tj|jd«}tj|j«}|dj    «}    tj
|    «j tj«}
tj|
|k\|    tj«|d<tdt|««D]@} || } tj
| «} |
| j tj«z }
‰jt| ««D]¸}tj
|    |«s| |s‰rŒ#‰r||xx|‰| dz
zzcc<n ||    |z|    |<| |sŒM‰rK|    || |k7r*|||    |z|| |zz|    |<‰r|    ||||zz |    |<‰r||xx|z cc<Œ”d||<Œš|    |xx| |z cc<Œ«| |sŒ±| ||    |<Œºtj|
|k\|    tj«|| <ŒC|S)Nr0r1r) rÚonesrIrÚcopyrÚastypeÚint64rJrr2rr)rrrrr3r4r5r9rr7r8rr;Úis_observationsr:r=r>r?r@rAr s               €€€€€€r$Ú    ewm_tablez0generate_numba_ewm_table_func.<locals>.ewm_table,sø€ðs˜S‘yÑ!ˆØ˜e™ ˆ Ù‘ EˆÜ—‘˜Ÿ™ a™Ó)ˆä—‘˜&Ÿ,™,Ó'ˆØ˜!‘9—>‘>Ó#ˆÜ—‘˜(Ó#Ð#×+Ñ+¬B¯H©HÓ5ˆÜ—H‘H˜T _Ñ4°hÄÇÁÓGˆˆq‰    Üqœ#˜f›+Ó&ó    LˆAؘ‘)ˆCÜ!Ÿx™x¨›}˜nˆOØ O×*Ñ*¬2¯8©8Ó4Ñ 4ˆDØ—\‘\¤# c£(Ó+ò )Ü—x‘x ¨¡ Ô,Ø& qÒ)²Ù$ð# 1›I¨¸&ÀÀQÁ¹-Ñ)GÑGœIà*7¸(À1¹+Ñ*E˜H Q™KØ*¨1Ó-Ù(à#+¨A¡;°#°a±&Ò#8à(.¨q©    °H¸Q±KÑ(?À&È3ÈqÉ6Á/Ñ(Qð%-¨Q¡Kñ(1Ø6>¸q±kÀVÈAÁYÐQWÑEWÑ6X¨°© Ù#)Ø$*¨1£I°Ñ$7¤Ià03 F¨1¢Ià (¨£ ¨s°1©vÑ 5¤ Ø$ QÓ'Ø"% a¡&H˜Q’Kð3 )ô6Ÿ™ ¨Ñ!8¸(ÄBÇFÁFÓKˆF1‹Ið?    LðBˆ r&rCrD)
r rrr>r=r@r?rAr]r s
   ````` @r$Úgenerate_numba_ewm_table_funcr^stý€õBÜä*¨7Ó3ˆà
‡YY˜¨¸€YÓAð0Øð0àð0ðð0ðð    0ð
 
÷ 0ñ0óBð0ðd Ðr&)r,zCallable[..., Scalar]r Úboolrr_rr_)r r_rr_rr_r>Úfloatr=r_r@r_r?ÚtuplerAr_)r,zCallable[..., np.ndarray]r r_rr_rr_)Ú
__future__rÚ    functoolsÚtypingrrrÚnumpyrÚpandas.compat._optionalrÚpandas.core.util.numba_rÚpandas._typingr    Úcacher-rErNrUr^©r&r$ú<module>rks•ðÝ"ã÷ñó å>å5áÝ%𠇁ð8Ø
ð8àð8ð ð8ðò    8óð8ðv ‡ð^Øð^à ð^ðð^ð
ð    ^ð
ð ^ð ð ^ð ð^ðò^óð^ðB ‡ð;Ø
#ð;àð;ð ð;ðò    ;óð;ðB ‡ñóðð" ‡ðXØðXà ðXððXð
ð    Xð
ð Xð ð Xð ðXðòXóñXr&