ó
    ¬œ‘hÆ‰  ã                  óh  • S r SSKJr  SSKJr  SSKJrJrJrJ	r	J
r
  SSKrSSKJrJrJr  SSKJrJrJrJrJr  SSKJr  SS	KJr  SS
KJrJrJrJrJ r J!r!  SSK"J#r#  SSK$J%r%J&r&J'r'  \(       a  SSK(J)r)  S4S jr*S5S jr+\
SS.     S6S jj5       r,\
      S7S j5       r,SS.     S8S jjr,/ SQr-/ SQr.S9S jr/S:S jr0    S;S jr1S<S jr2      S=S jr3S>S jr4      S?                 S@S jjr5SAS jr6        SB                   SCS  jjr7   SD         SES! jjr8   SF         SGS" jjr9  SH         SIS# jjr:   SJ         SKS$ jjr;          SLS% jr<    SM           SNS& jjr= SO   SPS' jjr>SQS( jr?\?   SR         SSS) jj5       r@\?   SR         SSS* jj5       rA\?   SR       STS+ jj5       rB\?   SR     SUS, jj5       rC      SVS- jrD      SVS. jrE\@\AS/.rFSWSXS0 jjrGSYS1 jrH      SZS2 jrIS[S3 jrJg)\z$
Routines for filling missing data.
é    )Úannotations)Úwraps)ÚTYPE_CHECKINGÚAnyÚLiteralÚcastÚoverloadN)ÚNaTÚalgosÚlib)Ú	ArrayLikeÚAxisIntÚFÚReindexMethodÚnpt)Úimport_optional_dependency)Úinfer_dtype_from)Úis_array_likeÚis_bool_dtypeÚis_numeric_dtypeÚis_numeric_v_string_likeÚis_object_dtypeÚneeds_i8_conversion)ÚDatetimeTZDtype)Úis_valid_na_for_dtypeÚisnaÚna_value_for_dtype©ÚIndexc                ó€   • [        U 5      (       a-  [        U 5      U:w  a  [        S[        U 5       SU 35      eX   n U $ )zB
Validate the size of the values passed to ExtensionArray.fillna.
z'Length of 'value' does not match. Got (z)  expected )r   ÚlenÚ
ValueError)ÚvalueÚmaskÚlengths      ÚWC:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\pandas/core/missing.pyÚcheck_value_sizer'   3   sQ   € ô �U×ÑÜˆu‹:˜ÓÜØ9¼#¸e»*¸ð FØ#˜Hð&óð ð ‘ˆà€Ló    c                ój  • [        U5      u  p![        U[        R                  5      (       a  [        R                  " XS9nO>UR                  5       n[        R                  " U5      (       d  U/nUR                  XSS9nSn[        U R                  5      (       a  Sn[        U 5      ) n[        U5      nX)    n[        R                  " U R                  [        S9n[        U R                  5      (       a5  [        U R                  5      (       d  [        UR                  5      (       a  Oä[        U R                  5      (       a5  [        UR                  5      (       a  [        UR                  5      (       d  O•U H�  n	[!        X	5      (       a  M  U(       a8  [        R                  " U R                  [        R"                  S9n
U W   U	:H  X¥'   O7X	:H  n
[        U
[        R$                  5      (       d  U
R'                  [        SS9n
XŠ-  nM‘     UR)                  5       (       a  U[        U 5      -  nU$ )zá
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]
)ÚdtypeF)r*   ÚcopyT)r*   Úna_value)r   Ú
isinstanceÚnpr*   ÚarrayÚconstruct_array_typer   Úis_list_likeÚ_from_sequencer   r   ÚzerosÚshapeÚboolr   r   r   Úbool_ÚndarrayÚto_numpyÚany)ÚarrÚvalues_to_maskr*   ÚclsÚpotential_naÚarr_maskÚna_maskÚnonnar$   ÚxÚnew_masks              r&   Úmask_missingrC   B   s³  € ô" -¨^Ó<Ñ€Eä�%œŸ™×"Ñ"ÜŸš .Ñ>‰à×(Ñ(Ó*ˆÜ×Ò ×/Ñ/Ø,Ð-ˆNØ×+Ñ+¨NÈeÐ+ÐTˆà€LÜ�s—y‘y×!Ñ!àˆÜ˜“I�:ˆä�>Ó"€GØ˜8Ñ$€Eô �8Š8�C—I‘I¤TÑ*€Dä˜Ÿ™×#Ñ#Ü˜cŸi™i×(Ñ(Ü˜%Ÿ+™+×&Ñ&àä�c—i‘i× Ñ Ü˜UŸ[™[×)Ñ)Ü˜eŸk™k×*Ñ*àãˆAÜ'¨×/Ñ/áæÜ!Ÿxšx¨¯	©	¼¿¹ÑB�HØ),¨X©¸!Ñ);�HÒ&à"™x�Hä% h´·
±
×;Ñ;à#+×#4Ñ#4¼4È%Ð#4Ð#P˜ØÑ ’ñ ð  ‡{�{‡}�}Ø”�S“	Ñˆà€Kr(   .©Úallow_nearestc               ó   • g ©N© ©ÚmethodrE   s     r&   Úclean_fill_methodrK   ‹   ó   € ð r(   c               ó   • g rG   rH   rI   s     r&   rK   rK   ”   rL   r(   Fc               óÞ   • [        U [        5      (       a!  U R                  5       n U S:X  a  Sn OU S:X  a  Sn SS/nSnU(       a  UR                  S5        SnX;  a  [	        SU S	U  35      eU $ )
NÚffillÚpadÚbfillÚbackfillzpad (ffill) or backfill (bfill)Únearestz(pad (ffill), backfill (bfill) or nearestzInvalid fill method. Expecting z. Got )r-   ÚstrÚlowerÚappendr"   )rJ   rE   Úvalid_methodsÚ	expectings       r&   rK   rK   �   s�   € ô
 �&œ#×Ñð —‘“ˆØ�WÓØ‰FØ�wÓØˆFà˜JÐ'€MØ1€IÞØ×Ñ˜YÔ'Ø>ˆ	ØÓ"ÜÐ:¸9¸+ÀVÈFÈ8ÐTÓUÐUØ€Mr(   )ÚlinearÚtimeÚindexÚvalues)rS   ÚzeroÚslinearÚ	quadraticÚcubicÚbarycentricÚkroghÚsplineÚ
polynomialÚfrom_derivativesÚpiecewise_polynomialÚpchipÚakimaÚcubicsplinec                óâ   • UR                  S5      nU S;   a  Uc  [        S5      e[        [        -   nX;  a  [        SU SU  S35      eU S;   a  UR                  (       d  [        U  S35      eU $ )	NÚorder)rc   rd   z7You must specify the order of the spline or polynomial.zmethod must be one of z. Got 'z
' instead.)rb   rf   rg   z4 interpolation requires that the index be monotonic.)Úgetr"   Ú
NP_METHODSÚ
SP_METHODSÚis_monotonic_increasing)rJ   r[   Úkwargsrk   Úvalids        r&   Úclean_interp_methodrr   Í   s…   € Ø�J‰J�wÓ€EàÐ)Ó)¨e©mÜÐRÓSÐSäœÑ#€EØÓÜÐ1°%°¸À¸xÀzÐRÓSÐSàÐ;Ó;Ø×,×,ÜØ�(ÐNÐOóð ð €Mr(   c                ó  • U S;   d   e[        U5      S:X  a  gUR                  S:X  a  UR                  SS9nU S:X  a  USS R                  5       nO+U S:X  a%  [        U5      S-
  USSS	2   R                  5       -
  nUW   nU(       d  gU$ )
zÿ
Retrieves the positional index of the first valid value.

Parameters
----------
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Úlastr   Né   é   ©Úaxisrt   ru   éÿÿÿÿ)r!   Úndimr9   Úargmax)ÚhowÚis_validÚidxposÚ	chk_notnas       r&   Úfind_valid_indexr�   à   s™   € ð Ð#Ó#Ð#Ð#ä
ˆ8ƒ}˜ÓØà‡}�}˜ÓØ—<‘< Q�<Ð'ˆà
ˆgƒ~Ø™"�×$Ñ$Ó&‰à	�‹Ü�X“ Ñ" X©d°¨d¡^×%:Ñ%:Ó%<Ñ<ˆà˜Ñ €IæØð €Mr(   c                ó\   • / SQnU R                  5       n X;  a  [        SU SU  S35      eU $ )N)ÚforwardÚbackwardÚbothz*Invalid limit_direction: expecting one of z, got 'z'.©rU   r"   )Úlimit_directionÚvalid_limit_directionss     r&   Úvalidate_limit_directionr‰     sK   € ò =ÐØ%×+Ñ+Ó-€OØÓ4ÜØ8Ø%Ð& g¨oÐ->¸bðBó
ð 	
ð Ðr(   c                ób   • U b+  SS/nU R                  5       n X;  a  [        SU SU  S35      eU $ )NÚinsideÚoutsidez%Invalid limit_area: expecting one of z, got Ú.r†   )Ú
limit_areaÚvalid_limit_areass     r&   Úvalidate_limit_arear�     sS   € ØÑØ% yÐ1ÐØ×%Ñ%Ó'ˆ
ØÓ.ÜØ7Ð8IÐ7JÈ&Ø�,˜að!óð ð Ðr(   c                ó–   • U c  US;   a  Sn U $ Sn  U $ US;   a  U S:w  a  [        SU S35      eUS;   a  U S:w  a  [        SU S35      eU $ )N)rR   rQ   r„   rƒ   )rP   rO   z0`limit_direction` must be 'forward' for method `Ú`z1`limit_direction` must be 'backward' for method `)r"   )r‡   rJ   s     r&   Úinfer_limit_directionr“   #  s�   € ð ÑØÐ*Ó*Ø(ˆOð Ðð (‰Oð Ðð Ð%Ó%¨/¸YÓ*FÜØBÀ6À(È!ÐLóð ð Ð*Ó*¨À*Ó/LÜØCÀFÀ8È1ÐMóð ð Ðr(   c                ó¶  • U S:X  a,  SSK Jn  U" [        R                  " [	        U5      5      5      nO}1 Skn[        UR                  5      =(       dB    [        UR                  [        5      =(       d!    [        R                  " UR                  S5      nX;  a  U(       d  [        SU  S35      e[        U5      R                  5       (       a  [        S5      eU$ )	NrY   r   r   >   rZ   r[   r\   rS   ÚmMz9Index column must be numeric or datetime type when using z_ method other than linear. Try setting a numeric or datetime index column before interpolating.zkInterpolation with NaNs in the index has not been implemented. Try filling those NaNs before interpolating.)Úpandasr   r.   Úaranger!   r   r*   r-   r   r   Úis_np_dtyper"   r   r9   ÚNotImplementedError)rJ   r[   r   ÚmethodsÚis_numeric_or_datetimes        r&   Úget_interp_indexrœ   8  s¼   € à�Óå á”b—i’i¤ E£
Ó+Ó,‰â8ˆä˜UŸ[™[Ó)÷ 2Ü˜%Ÿ+™+¤Ó7÷2ä�Š˜uŸ{™{¨DÓ1ð 	ð
 Ó Ö)?ÜðØ˜ð !!ð!óð ô ˆEƒ{‡�×ÑÜ!ð/ó
ð 	
ð
 €Lr(   c	           	     ó   ^^^^^^	^^• [        TU40 T	D6  [        TU R                  5      (       a  [        U R                  SS9mTS:X  a'  [	        UR                  5      (       d  [        S5      eSm[        T5      m[        U5      m[        R                  " STS9m[        UT5      mS	UUU	UUUUU4S jjn
[        R                  " X¢U 5        g)
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)ÚcompatrZ   zStime-weighted interpolation only works on Series or DataFrames with a DatetimeIndexr\   N)ÚnobsÚlimitc                ó0   >• [        STU TTTTTSTS.	TD6  g )NF)	ÚindicesÚyvaluesrJ   r    r‡   rŽ   Ú
fill_valueÚbounds_errorr$   rH   )Ú_interpolate_1d)	r£   r¤   r¢   rp   r    Úlimit_area_validatedr‡   r$   rJ   s	    €€€€€€€€r&   ÚfuncÚ$interpolate_2d_inplace.<locals>.func„  s7   ø€ ô 	ð 	
ØØØØØ+Ø+Ø!ØØñ	
ð ó	
r(   )r£   ú
np.ndarrayÚreturnÚNone)rr   r   r*   r   r   r"   r‰   r�   r   Úvalidate_limitÚ_index_to_interp_indicesr.   Úapply_along_axis)Údatar[   ry   rJ   r    r‡   rŽ   r¤   r$   rp   r¨   r¢   r§   s      ``` ``` @@r&   Úinterpolate_2d_inplacer±   W  s¶   ÿ€ ô. ˜ Ñ0¨Ò0ä˜Z¨¯©×4Ñ4Ü'¨¯
©
¸5ÑAˆ
à�ÓÜ" 5§;¡;×/Ñ/Üð óð ð
 ˆä.¨Ó?€OÜ.¨zÓ:Ðô × Ò  d°%Ñ8€Eä& u¨fÓ5€G÷
ö 
ô, ×Ò˜ DÕ)r(   c                ó\  • U R                   n[        UR                  5      (       a  UR                  S5      nUS:X  a  Un[	        [
        R                  U5      nU$ [
        R                  " U5      nUS;   a4  UR                  [
        R                  :X  a  [        R                  " U5      nU$ )z=
Convert Index to ndarray of indices to pass to NumPy/SciPy.
Úi8rY   )r\   r[   )Ú_valuesr   r*   Úviewr   r.   r7   ÚasarrayÚobject_r   Úmaybe_convert_objects)r[   rJ   ÚxarrÚindss       r&   r®   r®   �  s‹   € ð �=‰=€DÜ˜4Ÿ:™:×&Ñ&à�y‰y˜‹ˆà�ÓØˆÜ”B—J‘J Ó%ˆð €Kô �zŠz˜$ÓˆàÐ(Ó(Ø�z‰zœRŸZ™ZÓ'Ü×0Ò0°Ó6�à€Kr(   c
                ó  • U	b  U	nO[        U5      nU) nUR                  5       (       d  gUR                  5       (       a  g[        [        R
                  " U5      5      n[        SUS9nUc  Sn[        [        U5      5      n[        SUS9nUc  [        U5      n[        [        SU-   [        U5      5      5      nUS:X  a  U[        [        X³S5      5      -  nO5US:X  a  U[        [        USU5      5      -  nO[        [        X³U5      5      nUS	:X  a	  UUU-  -  nOUS
:X  a  Xß-
  U-
  nUU-  n[        U5      nUR                  R                  S;   nU(       a  UR                  S5      nU[        ;   a?  [        R                  " X   5      n[        R                   " X   X   U   X   U   5      X'   O[#        X   X   X   4UUUUS.U
D6X'   U	b  SU	SS& SU	U'   gU(       a  [$        R&                  UU'   g[        R(                  UU'   g)zõ
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.
Nrt   ©r}   r~   r   ru   rw   rƒ   r„   r‹   rŒ   r•   r³   )rJ   r¤   r¥   rk   FT)r   r9   ÚallÚsetr.   Úflatnonzeror�   Úranger!   Ú_interp_limitÚsortedr*   Úkindrµ   rm   ÚargsortÚinterpÚ_interpolate_scipy_wrapperr
   r#   Únan)r¢   r£   rJ   r    r‡   rŽ   r¤   r¥   rk   r$   rp   Úinvalidrq   Úall_nansÚfirst_valid_indexÚ
start_nansÚlast_valid_indexÚend_nansÚpreserve_nansÚmid_nansÚis_datetimelikeÚindexers                         r&   r¦   r¦   ³  s7  € ð0 ÑØ‰ä�w“-ˆØˆH€Eà�9‰9�;‰;Øà‡y�y‡{�{Øô ”2—>’> 'Ó*Ó+€Hä(¨W¸uÑEÐØÑ ØÐÜ”UÐ,Ó-Ó.€Jä'¨F¸UÑCÐØÑÜ˜w›<ÐÜ”5˜Ð-Ñ-¬s°5«zÓ:Ó;€Hð ˜)Ó#Ø"¤S¬°wÀqÓ)IÓ%JÑJ‰Ø	˜JÓ	&Ø ¤3¤}°W¸aÀÓ'GÓ#HÑH‰ô œM¨'¸%Ó@ÓAˆð �XÓà˜ hÑ.Ñ.‰Ø	�yÓ	 àÑ(¨8Ñ3ˆØ˜Ñ!ˆô ˜=Ó)€Mà—m‘m×(Ñ(¨DÑ0€OæØ—,‘,˜tÓ$ˆà”Óô —*’*˜W™^Ó,ˆÜŸ9š9ØÑ˜g™n¨WÑ5°w±~ÀgÑ7Nó
ˆÒô 6Ø‰NØ‰NØÑð	
ð Ø!Ø%Øñ	
ð ñ	
ˆÑð ÑØˆ‰QˆØ"ˆˆ]Ñð
 ö	 
Ü!$§¡ˆ�Ñð ô "$§¡ˆ�ÑØ
r(   c                óÚ  • U S3n[        SUS9  SSKJn	  [        R                  " U5      nU	R
                  U	R                  [        [        [        [        U	R                  S.n
/ SQnX;;   a&  US:X  a  UnOUnU	R                  XXÄUS	9nU" U5      nU$ US
:X  aC  [        U5      (       d  US::  a  [        SU 35      eU	R                  " X4SU0UD6nU" U5      nU$ U R                  R                   (       d  U R#                  5       n UR                  R                   (       d  UR#                  5       nUR                  R                   (       d  UR#                  5       nX£   nU" XU40 UD6nU$ )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)ra   rb   re   rf   ri   rh   rg   )rS   r]   r^   r_   r`   rd   rd   )rÃ   r¤   r¥   rc   z;order needs to be specified and greater than 0; got order: Úk)r   rÓ   rÖ   r.   r¶   Úbarycentric_interpolateÚkrogh_interpolateÚ_from_derivativesÚ_cubicspline_interpolateÚ_akima_interpolateÚpchip_interpolateÚinterp1dr   r"   ÚUnivariateSplineÚflagsÚ	writeabler+   )rA   ÚyÚnew_xrJ   r¤   r¥   rk   rp   rÔ   rÖ   Úalt_methodsÚinterp1d_methodsrÃ   ÚterpÚnew_ys                  r&   rÆ   rÆ   %  sp  € ð ˆhÐ4Ð5€EÜ˜w¨eÒ4Ý!ä�JŠJ�uÓ€Eð #×:Ñ:Ø×.Ñ.Ü-Ü 1Ü/Ü#Ø×.Ñ.ñ€KòÐð Ó!Ø�\Ó!Ø‰DàˆDØ×#Ñ#Ø�tÀð $ð 
ˆñ �U“ˆð( €Lð' 
�8Ó	ä��;‰;˜5 A›:ÜØMÈeÈWÐUóð ð ×+Ò+¨AÑD°EÐD¸VÑDˆÙ�U“ˆð €Lð �w‰w× × Ø—‘“ˆAØ�w‰w× × Ø—‘“ˆAØ�{‰{×$×$Ø—J‘J“LˆEØÑ"ˆÙ�Q˜5Ñ+ FÑ+ˆØ€Lr(   c                óx   • SSK Jn  UR                  R                  nU" XR	                  SS5      X5S9nU" U5      $ )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.
r   rÕ   rz   rw   )ÚordersÚextrapolate)rÓ   rÖ   ÚBPolyre   Úreshape)	ÚxiÚyirA   rk   Úderrê   rÖ   rJ   Úms	            r&   rÚ   rÚ   l  s;   € õR "ð ×Ñ×/Ñ/€FÙˆr—:‘:˜b !Ó$¨UÑL€AáˆQ‹4€Kr(   c                ó:   • SSK Jn  UR                  XUS9nU" X#S9$ )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 : np.ndarray
    A sorted list of x-coordinates, of length N.
yi : np.ndarray
    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 : np.ndarray
    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,

r   rÕ   rx   )Únu)rÓ   rÖ   ÚAkima1DInterpolator)rí   rî   rA   rï   ry   rÖ   ÚPs          r&   rÜ   rÜ   ž  s'   € õT "à×'Ñ'¨°TÐ'Ð:€AáˆQ‰<Ðr(   c                ó@   • SSK Jn  UR                  XX4US9nU" U5      $ )ak  
Convenience function for cubic spline data interpolator.

See `scipy.interpolate.CubicSpline` for details.

Parameters
----------
xi : np.ndarray, shape (n,)
    1-d array containing values of the independent variable.
    Values must be real, finite and in strictly increasing order.
yi : np.ndarray
    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 : np.ndarray, 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.
r   rÕ   )ry   Úbc_typerê   )rÓ   rÖ   ÚCubicSpline)rí   rî   rA   ry   rö   rê   rÖ   rô   s           r&   rÛ   rÛ   Ï  s/   € õZ "à×ÑØ
�T¸ð 	 ð 	€Añ ˆQ‹4€Kr(   c                ó.  • [        U 5      nU) nUR                  5       (       dr  [        SUS9nUc  Sn[        SUS9nUc  [        U 5      n[	        U UUUS9  US:X  a  SXFUS	-   & OUS
:X  a  S=USU& XGS	-   S& O[        S5      e[        R                  X'   gg)ao  
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: {'inside', 'outside'}
    Limit area for interpolation.

Notes
-----
Modifies values in-place.
rt   r¼   Nr   ru   )rJ   r    rŽ   r‹   Frw   rŒ   z*limit_area should be 'inside' or 'outside')r   r½   r�   r!   Úpad_or_backfill_inplacer"   r.   rÇ   )r\   rJ   r    rŽ   rÈ   r~   rt   ru   s           r&   Ú_interpolate_with_limit_arearú   %  s¸   € ô2 �6‹l€GØˆx€Hà�;‰;�=‰=Ü  W°xÑ@ˆØ‰=ØˆEÜ F°XÑ>ˆØ‰<Ü�v“;ˆDäØØØØ!ò		
ð ˜Ó!Ø(-ˆG˜D 1™HÑ%Ø˜9Ó$Ø49Ð9ˆG�F�UˆO˜g¨Q¡h jÑ1äÐIÓJÐJäŸ&™&ˆŠð- r(   c                óô   • US:X  a  S OS nU R                   S:X  a8  US:w  a  [        S5      eU R                  [        SU R                  -   5      5      n [        U5      nU" U 5      n[        USS9nU" XcUS	9  g
)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.
r   c                ó   • U $ rG   rH   ©rA   s    r&   Ú<lambda>Ú)pad_or_backfill_inplace.<locals>.<lambda>v  s   € ™r(   c                ó   • U R                   $ rG   )ÚTrý   s    r&   rþ   rÿ   v  s   € ¸¿ºr(   rw   z0cannot interpolate on a ndim == 1 with axis != 0©rw   rv   )r{   )r    rŽ   N)r{   ÚAssertionErrorrì   Útupler4   rK   Úget_fill_func)r\   rJ   ry   r    rŽ   ÚtransfÚtvaluesr¨   s           r&   rù   rù   Z  sw   € ð8 # a›iŠk©m€Fð ‡{�{�aÓØ�1‹9Ü Ð!SÓTÐTØ—‘¤ d¨V¯\©\Ñ&9Ó :Ó;ˆä˜vÓ&€FÙ�V‹n€Gä˜ aÑ(€Dáˆ¨*Ó5r(   c                ó"   • Uc  [        U 5      nU$ rG   )r   )r\   r$   s     r&   Ú_fillna_prepr	  †  s   € ð
 �|Ü�F‹|ˆà€Kr(   c                ó`   ^ • [        T 5         S   SU 4S jjj5       n[        [        U5      $ )z6
Wrapper to handle datetime64 and timedelta64 dtypes.
c                óÎ   >• [        U R                  5      (       aD  Uc  [        U 5      nT" U R                  S5      XUS9u  pCUR                  U R                  5      U4$ T" XX#S9$ )Nr³   )r    rŽ   r$   )r   r*   r   rµ   )r\   r    rŽ   r$   Úresultr¨   s        €r&   Únew_funcÚ&_datetimelike_compat.<locals>.new_func–  se   ø€ ô ˜vŸ|™|×,Ñ,Ø‰|ä˜F“|�áØ—‘˜DÓ!¨ÈDñ‰LˆFð —;‘;˜vŸ|™|Ó,¨dÐ2Ð2á�F°JÑJÐJr(   ©NNN)r    ú
int | NonerŽ   ú#Literal['inside', 'outside'] | None)r   r   r   )r¨   r  s   ` r&   Ú_datetimelike_compatr  ‘  sK   ø€ ô
 ˆ4ƒ[ð !Ø:>Øð	KàðKð 8÷Kó ðKô$ ”�8ÓÐr(   c                óŽ   • [        X5      nUb   UR                  5       (       d  [        X25        [        R                  " XUS9  X4$ ©N)r    )r	  r½   Ú_fill_limit_area_1dr   Úpad_inplace©r\   r    rŽ   r$   s       r&   Ú_pad_1dr  ¬  s>   € ô ˜Ó%€DØÑ d§h¡h§j¡jÜ˜DÔ-Ü	×Ò�f¨%Ò0Øˆ<Ðr(   c                óŽ   • [        X5      nUb   UR                  5       (       d  [        X25        [        R                  " XUS9  X4$ r  )r	  r½   r  r   Úbackfill_inplacer  s       r&   Ú_backfill_1dr  º  s>   € ô ˜Ó%€DØÑ d§h¡h§j¡jÜ˜DÔ-Ü	×Ò˜6¨uÒ5Øˆ<Ðr(   c                óŽ   • [        X5      nUb  [        X25        U R                  (       a  [        R                  " XUS9  X4$  X4$ r  )r	  Ú_fill_limit_area_2dÚsizer   Úpad_2d_inplacer  s       r&   Ú_pad_2dr   È  sJ   € ô ˜Ó%€DØÑÜ˜DÔ-à‡{‡{Ü×Ò˜V°Ò7ð ˆ<Ðð 	Øˆ<Ðr(   c                óŽ   • [        X5      nUb  [        X25        U R                  (       a  [        R                  " XUS9  X4$  X4$ r  )r	  r  r  r   Úbackfill_2d_inplacer  s       r&   Ú_backfill_2dr#  Û  sJ   € ô ˜Ó%€DØÑÜ˜DÔ-à‡{‡{Ü×!Ò! &°eÒ<ð ˆ<Ðð 	Øˆ<Ðr(   c                ó¶   • U ) nUR                  5       n[        U5      USSS2   R                  5       -
  S-
  nUS:X  a  SU SU& SXS-   S& gUS:X  a  SXS-   U& gg)a¯  Prepare 1d mask for ffill/bfill with limit_area.

Caller is responsible for checking at least one value of mask is False.
When called, mask will no longer faithfully represent when
the corresponding are NA or not.

Parameters
----------
mask : np.ndarray[bool, ndim=1]
    Mask representing NA values when filling.
limit_area : { "outside", "inside" }
    Whether to limit filling to outside or inside the outer most non-NA value.
Nrz   rw   r‹   FrŒ   )r|   r!   )r$   rŽ   Úneg_maskrt   ru   s        r&   r  r  î  sw   € ð  ˆu€HØ�O‰OÓ€EÜˆx‹=˜8¡D b D™>×0Ñ0Ó2Ñ2°QÑ6€DØ�XÓØˆˆVˆeˆØ ˆ�A‰XˆZÑØ	�yÓ	 Ø!&ˆ�Q‰Y˜Ñð 
!r(   c                óp  • U R                   ) nUS:X  aJ  [        R                  R                  USS9[        R                  R                  USSS2   SS9SSS2   -  nOK[        R                  R                  USS9) [        R                  R                  USSS2   SS9SSS2   ) -  nSXR                   '   g)ag  Prepare 2d mask for ffill/bfill with limit_area.

When called, mask will no longer faithfully represent when
the corresponding are NA or not.

Parameters
----------
mask : np.ndarray[bool, ndim=1]
    Mask representing NA values when filling.
limit_area : { "outside", "inside" }
    Whether to limit filling to outside or inside the outer most non-NA value.
rŒ   r   rx   Nrz   F)r  r.   ÚmaximumÚ
accumulate)r$   rŽ   r%  Úla_masks       r&   r  r    sÂ   € ð —‘ˆw€HØ�YÓô �J‰J×!Ñ! (°Ð!Ð3Ü�j‰j×#Ñ# H©T¨r¨T¡N¸Ð#Ð;¹D¸b¸DÑAñBñ 	ô �Z‰Z×"Ñ" 8°!Ð"Ð4Ð4Ü�z‰z×$Ñ$ X©d°¨d¡^¸!Ð$Ð<¹T¸r¸TÑBÐBñCð 	ð €D�‰‚Or(   ©rP   rR   c                óV   • [        U 5      n US:X  a	  [        U    $ [        [        S.U    $ )Nrw   r*  )rK   Ú_fill_methodsr   r#  )rJ   r{   s     r&   r  r  *  s.   € Ü˜vÓ&€FØˆqƒyÜ˜VÑ$Ð$Ü¬Ñ5°fÑ=Ð=r(   c                ó   • U c  g [        U SS9$ )NTrD   )rK   )rJ   s    r&   Úclean_reindex_fill_methodr.  1  s   € Ø�~ØÜ˜V°4Ñ8Ð8r(   c                ób  ^• [        U 5      m[        5       n[        5       nSU4S jjnUb1  US:X  a#  [        [        R                  " U 5      S   5      nOU" X5      nUbM  US:X  a  U$ [	        U" U SSS2   U5      5      n[        TS-
  [        R
                  " U5      -
  5      nUS:X  a  U$ X4-  $ )a  
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
c           	     ó  >• [        UT5      n[        XS-   5      R                  S5      n[        [        R
                  " U5      S   U-   5      [        [        R
                  " U S US-    ) R                  5       S:H  5      S   5      -  nU$ )Nrw   r   )ÚminÚ_rolling_windowr½   r¾   r.   ÚwhereÚcumsum)rÈ   r    ÚwindowedÚidxÚNs       €r&   ÚinnerÚ_interp_limit.<locals>.inner\  s„   ø€ Ü�E˜1“ˆÜ" 7°A©IÓ6×:Ñ:¸1Ó=ˆÜ”"—(’(˜8Ó$ QÑ'¨%Ñ/Ó0´3Ü�HŠH�w˜{ ¨¡Ð+Ð+×3Ñ3Ó5¸Ñ:Ó;¸AÑ>ó4
ñ 
ˆð ˆ
r(   Nr   rz   rw   )r    Úint)r!   r¾   r.   r3  Úlistr¶   )rÈ   Úfw_limitÚbw_limitÚf_idxÚb_idxr8  Ú	b_idx_invr7  s          @r&   rÁ   rÁ   7  s°   ø€ ôB 	ˆG‹€AÜ‹E€EÜ‹E€E÷ð ÑØ�q‹=ÜœŸš Ó)¨!Ñ,Ó-‰Eá˜'Ó,ˆEàÑØ�q‹=ð ˆLä™U 7©4¨R¨4¡=°(Ó;Ó<ˆIÜ˜˜A™¤§
¢
¨9Ó 5Ñ5Ó6ˆEØ˜1‹}Ø�à‰=Ðr(   c                óÚ   • U R                   SS U R                   S   U-
  S-   U4-   nU R                  U R                  S   4-   n[        R                  R                  R                  XUS9$ )zy
[True, True, False, True, False], 2 ->

[
    [True,  True],
    [True, False],
    [False, True],
    [True, False],
]
Nrz   rw   )r4   Ústrides)r4   rB  r.   r   Ústride_tricksÚ
as_strided)ÚaÚwindowr4   rB  s       r&   r2  r2  x  sh   € ð �G‰G�C�RˆL˜AŸG™G B™K¨&Ñ0°1Ñ4°fÐ=Ñ=€EØ�i‰i˜1Ÿ9™9 R™=Ð*Ñ*€GÜ�6‰6×Ñ×*Ñ*¨1À7Ð*ÐKÐKr(   )r$   únpt.NDArray[np.bool_]r%   r:  )r:   r   r«   rG  )rJ   z,Literal['ffill', 'pad', 'bfill', 'backfill']rE   zLiteral[False]r«   úLiteral['pad', 'backfill'])rJ   ú7Literal['ffill', 'pad', 'bfill', 'backfill', 'nearest']rE   zLiteral[True]r«   ú%Literal['pad', 'backfill', 'nearest'])rJ   rI  rE   r5   r«   rJ  )rJ   rT   r[   r   r«   rT   )r}   rT   r~   rG  r«   r  )r‡   rT   r«   z&Literal['forward', 'backward', 'both'])rŽ   ú
str | Noner«   r  )r‡   z-Literal['backward', 'forward', 'both'] | NonerJ   rT   r«   z&Literal['backward', 'forward', 'both'])r[   r   r«   r   )rY   Nrƒ   NNN)r°   rª   r[   r   ry   r   rJ   rT   r    r  r‡   rT   rŽ   rK  r¤   ú
Any | Noner«   r¬   )r[   r   rJ   rT   r«   rª   )rY   Nrƒ   NNFNN)r¢   rª   r£   rª   rJ   rT   r    r  r‡   rT   rŽ   r  r¤   rL  r¥   r5   rk   r  r«   r¬   )NFN)
rA   rª   râ   rª   rã   rª   rJ   rT   r¥   r5   )Nr   F)
rí   rª   rî   rª   rA   rª   rï   úint | list[int] | Nonerê   r5   )r   r   )
rí   rª   rî   rª   rA   rª   rï   rM  ry   r   )r   z
not-a-knotN)
rí   rª   rî   rª   rA   rª   ry   r   rö   zstr | tuple[Any, Any])
r\   rª   rJ   rH  r    r  rŽ   zLiteral['inside', 'outside']r«   r¬   )rP   r   NN)r\   rª   rJ   rH  ry   r   r    r  rŽ   r  r«   r¬   rG   )r$   únpt.NDArray[np.bool_] | Noner«   rG  )r¨   r   r«   r   r  )
r\   rª   r    r  rŽ   r  r$   rN  r«   z(tuple[np.ndarray, npt.NDArray[np.bool_]])r\   rª   r    r  rŽ   r  r$   rN  )r    r  rŽ   r  r$   rN  )r$   rG  rŽ   zLiteral['outside', 'inside']r«   r¬   r  )r{   r:  )r«   zReindexMethod | None)rÈ   rG  r<  r  r=  r  )rE  rG  rF  r:  r«   rG  )KÚ__doc__Ú
__future__r   Ú	functoolsr   Útypingr   r   r   r   r	   Únumpyr.   Úpandas._libsr
   r   r   Úpandas._typingr   r   r   r   r   Úpandas.compat._optionalr   Úpandas.core.dtypes.castr   Úpandas.core.dtypes.commonr   r   r   r   r   r   Úpandas.core.dtypes.dtypesr   Úpandas.core.dtypes.missingr   r   r   r–   r   r'   rC   rK   rm   rn   rr   r�   r‰   r�   r“   rœ   r±   r®   r¦   rÆ   rÚ   rÜ   rÛ   rú   rù   r	  r  r  r  r   r#  r  r  r,  r  r.  rÁ   r2  rH   r(   r&   Ú<module>r[     s…  ðñõ #å ÷õ ó ÷ñ ÷
õ õ ?å 4÷÷ õ 6÷ñ ö ÝôôFðR 
ð %(ñØ8ðð "ðð  ô	ó 
ðð 
ðØCðð !ðð +ó	ó 
ðð  ñØCðð ðð +õ	ò4 3€
ò€
ô$ô&#ðLØðà+ôôðØBðØLOðà+ôô*ðF ØØ$Ø!Ø!Ø	ðC*Ø
ðC*àðC*ð ðC*ð ð	C*ð
 ðC*ð ðC*ð ðC*ð ðC*ð 
õC*ôLð2 ØØ$Ø6:Ø!ØØØ	ðoØðoàðoð ðoð ð	oð
 ðoð 4ðoð ðoð ðoð ðoð 
õoðn ØØ
ðDØðDàðDð ðDð ð	Dð õDðV Ø"#Øð/Øð/àð/ð ð/ð
 
 ð/ð õ/ðl #$Øð.Øð.àð.ð ð.ð 
 ð	.ð
 õ.ðj Ø%1ØðSØðSàðSð ðSð ð	Sð
 #õSðl2!Øð2!à&ð2!ð ð2!ð -ð	2!ð
 
ô2!ðn */ØØØ6:ð)6Øð)6à&ð)6ð ð)6ð ð	)6ð
 4ð)6ð 
õ)6ðZ 26ðØ.ðàõôð6 ð Ø6:Ø)-ð	
Øð
àð
ð 4ð
ð 'ð	
ð
 .ô
ó ð
ð ð Ø6:Ø)-ð	
Øð
àð
ð 4ð
ð 'ð	
ð
 .ô
ó ð
ð ð Ø6:Ø)-ð	Øðàðð 4ðð 'ô	ó ðð$ ð Ø6:Ø)-ð	àðð 4ðð 'ô	ó ðð$'Ø
ð'Ø-Ið'à	ô'ð4Ø
ðØ-Iðà	ôð>  ¨\Ñ:€ö>ô9ð>Ø"ð>Ø.8ð>ØDNô>õBLr(   