zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
U
¬ý°d>}ã@südZddlmZddlmZmZddlmZmZm    Z    ddl
Z ddl m Z mZmZddlmZmZmZmZmZddlmZdd    lmZdd
lmZmZmZmZdd lm Z m!Z!m"Z"erÀdd l#m$Z$d ddœdd„Z%dd dœdd„Z&d‚dddœdd„Z'ddddgZ(d d!d"d#d$d%d&d'd(d)d*d+d,d-gZ)d.d/d.d0œd1d2„Z*d.d d3d4œd5d6„Z+dƒd9d.d:d;d3d.dd<ddd=d>œ d?d@„Z,d„d9d/d:d.d3d.dd<d=dAœ    dBdC„Z-d/d.d9dDœdEdF„Z.d…d9d9dd3d.dd<dd3d=dGœ
dHdI„Z/d†ddJœdKdL„Z0d‡dMddNœdOdP„Z1dˆdMd:dQœdRdS„Z2d‰d:dUdVœdWdX„Z3d9d.d3dd=dYœdZd[„Z4dŠd9d.d\d3dd=d]œd^d_„Z5d‹d`d daœdbdc„Z6dddddeœdfdg„Z7e7dŒd9d3d`dhdiœdjdk„ƒZ8e7dd9d3d`dhdiœdldm„ƒZ9e7dŽd9d`dnœdodp„ƒZ:e7dd`dqœdrds„ƒZ;e8e9dtœZ<dddvœdwdx„Z=ddyœdzd{„Z>d d|œd}d~„Z?d dd dœd€d„Z@dS)‘z$
Routines for filling missing data.
é)Ú annotations)ÚpartialÚwraps)Ú TYPE_CHECKINGÚAnyÚcastN)ÚNaTÚalgosÚlib)Ú    ArrayLikeÚAxisÚAxisIntÚFÚnpt)Úimport_optional_dependency)Úinfer_dtype_from)Ú is_array_likeÚis_numeric_v_string_likeÚis_object_dtypeÚneeds_i8_conversion)Úis_valid_na_for_dtypeÚisnaÚna_value_for_dtype)ÚIndexznpt.NDArray[np.bool_]Úint)ÚmaskÚlengthcCs8t|ƒr4t|ƒ|kr,tdt|ƒ›d|›ƒ‚||}|S)zJ
    Validate the size of the values passed to ExtensionArray.fillna.
    z'Length of 'value' does not match. Got (z )  expected )rÚlenÚ
ValueError)Úvaluerr©r úJd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/core/missing.pyÚcheck_value_size1s ÿr"r )ÚarrÚreturnc
CsÖt|ƒ\}}tj||d}d}t|ƒr4d}t|ƒ}t|ƒ}||}tj|jtd}|D]b}t||ƒrjqZ|r’tj|jtj    d}    |||k|    |<n"||k}    t
|    tj ƒs´|    j tdd}    ||    O}qZ|  ¡rÒ|t|ƒO}|S)a    
    Return a masking array of same size/shape as arr
    with entries equaling any member of values_to_mask set to True
 
    Parameters
    ----------
    arr : ArrayLike
    values_to_mask: list, tuple, or scalar
 
    Returns
    -------
    np.ndarray[bool]
    )ÚdtypeFT)r%Zna_value)rÚnpÚarrayrrÚzerosÚshapeÚboolrZbool_Ú
isinstanceÚndarrayZto_numpyÚany)
r#Zvalues_to_maskr%Z potential_naZarr_maskZna_maskZnonnarÚxZnew_maskr r r!Ú mask_missing@s, 
 
 
 
 r/Fz
str | Noner*)ÚmethodÚ allow_nearestcCsv|dkr dSt|tƒr8| ¡}|dkr,d}n |dkr8d}ddg}d}|rV| d¡d}||krrtd    |›d
|›ƒ‚|S) N)NZasfreqZffillÚpadZbfillÚbackfillzpad (ffill) or backfill (bfill)Únearestz(pad (ffill), backfill (bfill) or nearestzInvalid fill method. Expecting z. Got )r+ÚstrÚlowerÚappendr)r0r1Z valid_methodsZ    expectingr r r!Úclean_fill_methodys 
 
r8ÚlinearÚtimeÚindexÚvaluesr4ÚzeroÚslinearÚ    quadraticÚcubicÚ barycentricÚkroghÚsplineÚ
polynomialÚfrom_derivativesÚpiecewise_polynomialÚpchipÚakimaÚ cubicspliner5r)r0r;r$cKsh| d¡}|dkr"|dkr"tdƒ‚tt}||krHtd|›d|›dƒ‚|dkrd|jsdt|›dƒ‚|S)    NÚorder)rCrDz7You must specify the order of the spline or polynomial.zmethod must be one of z. Got 'z
' instead.)rBrFrGz4 interpolation requires that the index be monotonic.)ÚgetrÚ
NP_METHODSÚ
SP_METHODSZis_monotonic_increasing)r0r;ÚkwargsrJÚvalidr r r!Úclean_interp_method§s
ÿrPz
int | None)ÚhowÚis_validr$cCs†|dks t‚t|ƒdkrdS|jdkr2|jdd}|dkrL|dd… ¡}n&|dkrrt|ƒd|ddd    … ¡}||}|s‚dS|S)
aG
    Retrieves the index of the first valid value.
 
    Parameters
    ----------
    values : ndarray or ExtensionArray
    how : {'first', 'last'}
        Use this parameter to change between the first or last valid index.
    is_valid: np.ndarray
        Mask to find na_values.
 
    Returns
    -------
    int or None
    )ÚfirstÚlastrNéé©ÚaxisrSrTéÿÿÿÿ)ÚAssertionErrorrÚndimr-Zargmax)r<rQrRZidxposZ    chk_notnar r r!Úfind_valid_indexºs  
 r\r2Úforwardú
np.ndarrayr z Index | Nonez
Any | NoneÚNone) Údatar0rXr;ÚlimitÚlimit_directionÚ
limit_areaÚ
fill_valueÚcoerceÚdowncastr$c
Ks‚z t|ƒ} Wntk
r$d} YnX| dk    rR|dk    r>tdƒ‚t|| |||dn,|dk    s^t‚tf||||||||dœ|
—ŽdS)z…
    Wrapper to dispatch to either interpolate_2d or _interpolate_2d_with_fill.
 
    Notes
    -----
    Alters 'data' in-place.
    Nz&Cannot pass both fill_value and method)r0rXrarc)r`r;rXr0rarbrcrd)r8rÚinterpolate_2drZÚ_interpolate_2d_with_fill) r`r0rXr;rarbrcrdrerfrNÚmr r r!Úinterpolate_array_2dãs6 
û ø    ÷rj)    r`r;rXr0rarbrcrdr$c  sötˆ|fˆŽtˆ|jƒr(t|jdd‰ˆdkrFt|jƒsBtdƒ‚d‰dddg}    ˆ ¡‰ˆ|    krvtd    |    ›d
ˆ›d ƒ‚ˆd k    r¬d dg}
ˆ ¡‰ˆ|
kr¬td|
›dˆ›dƒ‚tjd ˆd‰t    |ˆƒ‰dddœ‡‡‡‡‡‡‡fdd„ } t
  | ||¡d S)zÝ
    Column-wise application of _interpolate_1d.
 
    Notes
    -----
    Alters 'data' in-place.
 
    The signature does differ from _interpolate_1d because it only
    includes what is needed for Block.interpolate.
    F)Úcompatr:zStime-weighted interpolation only works on Series or DataFrames with a DatetimeIndexr<r]ÚbackwardZbothz*Invalid limit_direction: expecting one of z, got 'z'.NÚinsideÚoutsidez%Invalid limit_area: expecting one of z, got Ú.)Znobsrar^r_)Úyvaluesr$c s$tfˆ|ˆˆˆˆˆddœˆ—ŽdS)NF)Úindicesrpr0rarbrcrdÚ bounds_error)Ú_interpolate_1d)rp©rdrqrNrarcrbr0r r!ÚfuncRsø    ÷z'_interpolate_2d_with_fill.<locals>.func) rPrr%rrrr6r    Zvalidate_limitÚ_index_to_interp_indicesr&Úapply_along_axis) r`r;rXr0rarbrcrdrNZvalid_limit_directionsZvalid_limit_areasrur rtr!rhs4 
ÿ
ÿÿ
 rh)r;r0r$cCs`|j}t|jƒr| d¡}|dkr4|}ttj|ƒ}n(t |¡}|dkr\|jtjkr\t     
|¡}|S)zE
    Convert Index to ndarray of indices to pass to NumPy/SciPy.
    Úi8r9)r<r;) Ú_valuesrr%Úviewrr&r,ÚasarrayZobject_r
Zmaybe_convert_objects)r;r0ZxarrZindsr r r!rvjs
 
 
 
rv)
rqrpr0rarbrcrdrrrJr$c    Ks¾t|ƒ}
|
} |  ¡sdS|  ¡r&dStt |
¡ƒ} t|d| d} | dkrNd} tt| ƒƒ}t|d| d}|dkrxt|ƒ}ttd|t| ƒƒƒ}|dkr¬|tt    |
|dƒƒB}n.|dkrÊ|tt    |
d|ƒƒB}ntt    |
||ƒƒ}|d    krð|||BO}n|d
kr| ||}||O}t
|ƒ}t |j ƒ}|r0|  d ¡}|tkrpt || ¡}t ||
|| ||| |¡||
<n.t|| || ||
f||||d œ|    —Ž||
<|r°tj||<n
tj||<dS) a
    Logic for the 1-d interpolation.  The input
    indices and yvalues will each be 1-d arrays of the same length.
 
    Bounds_error is currently hardcoded to False since non-scipy ones don't
    take it as an argument.
 
    Notes
    -----
    Fills 'yvalues' in-place.
    NrS©rQrRrrTrVr]rlrmrnrx)r0rdrrrJ)rr-ÚallÚsetr&Z flatnonzeror\ÚrangerÚ _interp_limitÚsortedrr%rzrLZargsortZinterpÚ_interpolate_scipy_wrapperrrÚnan)rqrpr0rarbrcrdrrrJrNÚinvalidrOZall_nansZfirst_valid_indexZ
start_nansZlast_valid_indexZend_nansZ preserve_nansZmid_nansZis_datetimelikeZindexerr r r!rs€sh  
 
 
 
 
 
ÿ
ýùø
 
rs)rrcKsx|›d}td|dddlm}    t |¡}|    j|    jttdœ}
t|ddƒrb|j     
d    ¡| 
d    ¡}}|d
krv|    j |
d
<n"|d krˆt |
d <n|d kr˜t |
d <d dddddg} || krÚ|dkr¼|}|    j|||||d} | |ƒ} nš|dkr&t|ƒsö|dkrtd|›ƒ‚|    j||fd|i|—Ž} | |ƒ} nN|jjs8| ¡}|jjsJ| ¡}|jjs\| ¡}|
|}||||f|Ž} | S)zµ
    Passed off to scipy.interpolate.interp1d. method is scipy's kind.
    Returns an array interpolated at new_x.  Add any new methods to
    the list in _clean_interp_method.
    z interpolation requires SciPy.Úscipy)Úextrar©Ú interpolate)rArBrErFZ _is_all_datesFrxrGrHrIr4r=r>r?r@rD)ÚkindrdrrrCz;order needs to be specified and greater than 0; got order: Úk)rr…rˆr&r{Zbarycentric_interpolateZkrogh_interpolateÚ_from_derivativesÚgetattrryZastypeZpchip_interpolateÚ_akima_interpolateÚ_cubicspline_interpolateZinterp1drrZUnivariateSplineÚflagsZ    writeableÚcopy)r.ÚyZnew_xr0rdrrrJrNr†rˆZ alt_methodsZinterp1d_methodsZterpZnew_yr r r!r‚ìsf
 
ü  
úÿ
 
ÿ
 
 
 
r‚zint | list[int] | None)ÚderÚ extrapolatec    Cs4ddlm}|jj}||| dd¡||d}||ƒS)aŸ
    Convenience function for interpolate.BPoly.from_derivatives.
 
    Construct a piecewise polynomial in the Bernstein basis, compatible
    with the specified values and derivatives at breakpoints.
 
    Parameters
    ----------
    xi : array-like
        sorted 1D array of x-coordinates
    yi : array-like or list of array-likes
        yi[i][j] is the j-th derivative known at xi[i]
    order: None or int or array-like of ints. Default: None.
        Specifies the degree of local polynomials. If not None, some
        derivatives are ignored.
    der : int or list
        How many derivatives to extract; None for all potentially nonzero
        derivatives (that is a number equal to the number of points), or a
        list of derivatives to extract. This number includes the function
        value as 0th derivative.
     extrapolate : bool, optional
        Whether to extrapolate to ouf-of-bounds points based on first and last
        intervals, or to return NaNs. Default: True.
 
    See Also
    --------
    scipy.interpolate.BPoly.from_derivatives
 
    Returns
    -------
    y : scalar or array-like
        The result, of length R or length M or M by R.
    rr‡rYrV)Zordersr“)r…rˆZBPolyrEÚreshape)    ÚxiÚyir.rJr’r“rˆr0rir r r!r‹9s$ r‹)r’rXcCs(ddlm}|j|||d}|||dS)a[
    Convenience function for akima interpolation.
    xi and yi are arrays of values used to approximate some function f,
    with ``yi = f(xi)``.
 
    See `Akima1DInterpolator` for details.
 
    Parameters
    ----------
    xi : array-like
        A sorted list of x-coordinates, of length N.
    yi : array-like
        A 1-D array of real values.  `yi`'s length along the interpolation
        axis must be equal to the length of `xi`. If N-D array, use axis
        parameter to select correct axis.
    x : scalar or array-like
        Of length M.
    der : int, optional
        How many derivatives to extract; None for all potentially
        nonzero derivatives (that is a number equal to the number
        of points), or a list of derivatives to extract. This number
        includes the function value as 0th derivative.
    axis : int, optional
        Axis in the yi array corresponding to the x-coordinate values.
 
    See Also
    --------
    scipy.interpolate.Akima1DInterpolator
 
    Returns
    -------
    y : scalar or array-like
        The result, of length R or length M or M by R,
 
    rr‡rW)Únu)r…rˆZAkima1DInterpolator)r•r–r.r’rXrˆÚPr r r!rfs$ rú
not-a-knotzstr | tuple[Any, Any])rXÚbc_typecCs(ddlm}|j|||||d}||ƒS)aq
    Convenience function for cubic spline data interpolator.
 
    See `scipy.interpolate.CubicSpline` for details.
 
    Parameters
    ----------
    xi : array-like, shape (n,)
        1-d array containing values of the independent variable.
        Values must be real, finite and in strictly increasing order.
    yi : array-like
        Array containing values of the dependent variable. It can have
        arbitrary number of dimensions, but the length along ``axis``
        (see below) must match the length of ``x``. Values must be finite.
    x : scalar or array-like, shape (m,)
    axis : int, optional
        Axis along which `y` is assumed to be varying. Meaning that for
        ``x[i]`` the corresponding values are ``np.take(y, i, axis=axis)``.
        Default is 0.
    bc_type : string or 2-tuple, optional
        Boundary condition type. Two additional equations, given by the
        boundary conditions, are required to determine all coefficients of
        polynomials on each segment [2]_.
        If `bc_type` is a string, then the specified condition will be applied
        at both ends of a spline. Available conditions are:
        * 'not-a-knot' (default): The first and second segment at a curve end
          are the same polynomial. It is a good default when there is no
          information on boundary conditions.
        * 'periodic': The interpolated functions is assumed to be periodic
          of period ``x[-1] - x[0]``. The first and last value of `y` must be
          identical: ``y[0] == y[-1]``. This boundary condition will result in
          ``y'[0] == y'[-1]`` and ``y''[0] == y''[-1]``.
        * 'clamped': The first derivative at curves ends are zero. Assuming
          a 1D `y`, ``bc_type=((1, 0.0), (1, 0.0))`` is the same condition.
        * 'natural': The second derivative at curve ends are zero. Assuming
          a 1D `y`, ``bc_type=((2, 0.0), (2, 0.0))`` is the same condition.
        If `bc_type` is a 2-tuple, the first and the second value will be
        applied at the curve start and end respectively. The tuple values can
        be one of the previously mentioned strings (except 'periodic') or a
        tuple `(order, deriv_values)` allowing to specify arbitrary
        derivatives at curve ends:
        * `order`: the derivative order, 1 or 2.
        * `deriv_value`: array-like containing derivative values, shape must
          be the same as `y`, excluding ``axis`` dimension. For example, if
          `y` is 1D, then `deriv_value` must be a scalar. If `y` is 3D with
          the shape (n0, n1, n2) and axis=2, then `deriv_value` must be 2D
          and have the shape (n0, n1).
    extrapolate : {bool, 'periodic', None}, optional
        If bool, determines whether to extrapolate to out-of-bounds points
        based on first and last intervals, or to return NaNs. If 'periodic',
        periodic extrapolation is used. If None (default), ``extrapolate`` is
        set to 'periodic' for ``bc_type='periodic'`` and to True otherwise.
 
    See Also
    --------
    scipy.interpolate.CubicHermiteSpline
 
    Returns
    -------
    y : scalar or array-like
        The result, of shape (m,)
 
    References
    ----------
    .. [1] `Cubic Spline Interpolation
            <https://en.wikiversity.org/wiki/Cubic_Spline_Interpolation>`_
            on Wikiversity.
    .. [2] Carl de Boor, "A Practical Guide to Splines", Springer-Verlag, 1978.
    rr‡)rXršr“)r…rˆZ CubicSpline)r•r–r.rXršr“rˆr˜r r r!rŽ‘sM ÿrŽ)r<r0rarcr$cCs¨t|ƒ}|}| ¡s¤t|d|d}|dkr0d}t|d|d}|dkrNt|ƒ}t|||d|dkrvd|||d    …<n$|d
kršd|d|…<||d    d…<tj||<dS) a¶
    Apply interpolation and limit_area logic to values along a to-be-specified axis.
 
    Parameters
    ----------
    values: np.ndarray
        Input array.
    method: str
        Interpolation method. Could be "bfill" or "pad"
    limit: int, optional
        Index limit on interpolation.
    limit_area: str
        Limit area for interpolation. Can be "inside" or "outside"
 
    Notes
    -----
    Modifies values in-place.
    rSr|NrrT)r0rarmFrVrn)rr}r\rrgr&rƒ)r<r0rarcr„rRrSrTr r r!Ú_interpolate_with_limit_areaçs&ýr›r )r<r0rXrarcr$cCs¢|dk    r&t tt|||d||¡dS|dkr6dd„ndd„}|jdkrl|dkrXtdƒ‚| td    |jƒ¡}t    |ƒ}||ƒ}|d
kr’t
||d n t ||d dS) a
    Perform an actual interpolation of values, values will be make 2-d if
    needed fills inplace, returns the result.
 
    Parameters
    ----------
    values: np.ndarray
        Input array.
    method: str, default "pad"
        Interpolation method. Could be "bfill" or "pad"
    axis: 0 or 1
        Interpolation axis
    limit: int, optional
        Index limit on interpolation.
    limit_area: str, optional
        Limit area for interpolation. Can be "inside" or "outside"
 
    Notes
    -----
    Modifies values in-place.
    N)r0rarcrcSs|S©Nr ©r.r r r!Ú<lambda>Ióz interpolate_2d.<locals>.<lambda>cSs|jSrœ)ÚTrr r r!ržIrŸrVz0cannot interpolate on a ndim == 1 with axis != 0)rVr2©ra) r&rwrr›r[rZr”Útupler)r8Ú_pad_2dÚ _backfill_2d)r<r0rXrarcZtransfZtvaluesr r r!rgs.    üî
 rgznpt.NDArray[np.bool_] | None)rr$cCs |dkrt|ƒ}| tj¡}|Srœ)rrzr&Zuint8©r<rr r r!Ú _fillna_prep]s r¦r)rur$cs tˆƒd‡fdd„    ƒ}tt|ƒS)z>
    Wrapper to handle datetime64 and timedelta64 dtypes.
    NcsPt|jƒrB|dkrt|ƒ}ˆ| d¡||d\}}| |j¡|fSˆ|||dS)Nrx)rar)rr%rrz)r<rarÚresult©rur r!Únew_funcns 
z&_datetimelike_compat.<locals>.new_func)NN)rrr)rur©r r¨r!Ú_datetimelike_compatis rªz(tuple[np.ndarray, npt.NDArray[np.bool_]])r<rarr$cCs"t||ƒ}tj|||d||fS©Nr¡)r¦r    Z pad_inplace©r<rarr r r!Ú_pad_1d}s
r­cCs"t||ƒ}tj|||d||fSr«)r¦r    Zbackfill_inplacer¬r r r!Ú _backfill_1dˆs
r®r¥cCs0t||ƒ}t |j¡r(tj|||dn||fSr«)r¦r&r}r)r    Zpad_2d_inplacer¬r r r!r£“s
 r£)rcCs0t||ƒ}t |j¡r(tj|||dn||fSr«)r¦r&r}r)r    Zbackfill_2d_inplacer¬r r r!r¤Ÿs
 r¤©r2r3rV)r[cCs&t|ƒ}|dkrt|Sttdœ|S)NrVr¯)r8Ú _fill_methodsr£r¤)r0r[r r r!Ú get_fill_func®sr±)r$cCs t|ddS)NT)r1)r8)r0r r r!Úclean_reindex_fill_methodµsr²)r„cs¤t|ƒ‰tƒ}tƒ}‡fdd„}|dk    rN|dkrDtt |¡dƒ}n
|||ƒ}|dk    rœ|dkrb|St||ddd…|ƒƒ}tˆdt |¡ƒ}|dkrœ|S||@S)ak
    Get indexers of values that won't be filled
    because they exceed the limits.
 
    Parameters
    ----------
    invalid : np.ndarray[bool]
    fw_limit : int or None
        forward limit to index
    bw_limit : int or None
        backward limit to index
 
    Returns
    -------
    set of indexers
 
    Notes
    -----
    This is equivalent to the more readable, but slower
 
    .. code-block:: python
 
        def _interp_limit(invalid, fw_limit, bw_limit):
            for x in np.where(invalid)[0]:
                if invalid[max(0, x - fw_limit):x + bw_limit + 1].all():
                    yield x
    cs`t|ˆƒ}t||dƒ d¡}tt |¡d|ƒtt |d|d… ¡dk¡dƒB}|S)NrVr)ÚminÚ_rolling_windowr}r~r&ÚwhereZcumsum)r„raZwindowedÚidx©ÚNr r!ÚinnerÜs 
"ÿz_interp_limit.<locals>.innerNrrYrV)rr~r&rµÚlistr{)r„Zfw_limitZbw_limitZf_idxZb_idxr¹Z    b_idx_invr r·r!r€¹s  
r€)ÚaÚwindowr$cCsJ|jdd…|jd|d|f}|j|jdf}tjjj|||dS)z™
    [True, True, False, True, False], 2 ->
 
    [
        [True,  True],
        [True, False],
        [False, True],
        [True, False],
    ]
    NrYrV)r)Ústrides)r)r½r&r
Z stride_tricksZ
as_strided)r»r¼r)r½r r r!r´øs $r´)F)    r2rNNr]NNFN)r9Nr]NN)r9Nr]NNFN)NFN)NrF)rr)rr™N)r2rNN)N)NN)NN)NN)NN)rV)AÚ__doc__Ú
__future__rÚ    functoolsrrÚtypingrrrÚnumpyr&Z pandas._libsrr    r
Zpandas._typingr r r rrZpandas.compat._optionalrZpandas.core.dtypes.castrZpandas.core.dtypes.commonrrrrZpandas.core.dtypes.missingrrrZpandasrr"r/r8rLrMrPr\rjrhrvrsr‚r‹rrŽr›rgr¦rªr­r®r£r¤r°r±r²r€r´r r r r!Ú<module>s    9 ò+ö$9ø R÷"qùNÿ-/úV1ûHÿ ý
ý
 
?