Ë
    u™ãjÏh ã                  ó¶  — U d dl mZ d dlmZmZ d dlmZ d dlZd dlmZm	Z	m
Z
mZmZmZmZmZ d dlZd dlZd dlmZ d dlmZ d dlmZmZmZ d d	lmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z- d d
l.m/Z/m0Z0 d dl1m2Z2 d dl3m4Z4 d dl5m6Z6 d dl7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZF d dlGmHZI d dlJmKZKmLZLmMZMmNZN d dlOmPZP d dlQmRZR d dlSmTZT d dlUmVZVmWZWmXZXmYZYmZZZm[Z[ d dl\m]Z]m^Z^m_Z_m`Z`maZa d dlbmcZcmdZd d dlemfZfmgZg d dlhmiZimjZjmkZkmlZl d dlmmnZnmoZompZp d dlqmrZr d dlsmtZt d dlumvZvmwZw d dlxmyZy d dlzm{Z{ d dl|m}Z} d d l~mZ€m�Z�m‚Z‚ d d!lƒm„Z„ d d"l…m†Z† d d#l‡mˆZˆm‰Z‰ d d$lŠm‹Z‹ er d d%lŒm�Z�mŽZŽm�Z� d d&l7m�Z� d d'l‘m’Z’ d d(l“m”Z”m•Z•m–Z– e:e"z  Z—d)e˜d*<   d9d+„Z™d:d,„Zš G d-„ d.etev«      Z› G d/„ d0e›«      Zœd1Z� G d2„ d3e›«      Zž	 	 	 	 	 	 d;d4„ZŸed<d5„«       Z ed=d6„«       Z d>d7„Z d?d8„Z¡y)@é    )Úannotations)ÚdatetimeÚ	timedelta)ÚwrapsN)ÚTYPE_CHECKINGÚAnyÚLiteralÚSelfÚ	TypeAliasÚcastÚfinalÚoverload)Úusing_string_dtype)Ú_global_config)ÚalgosÚgroupbyÚlib)Ú
BaseOffsetÚDayÚIncompatibleFrequencyÚNaTÚNaTTypeÚPeriodÚTickÚ	TimedeltaÚ	TimestampÚadd_overflowsafeÚastype_overflowsafeÚget_unit_from_dtypeÚiNaTÚints_to_pydatetimeÚints_to_pytimedeltaÚperiods_per_day)ÚRoundToÚround_nsint64)Úcompare_mismatched_resolutions)Úget_unit_for_round)Úinteger_op_not_supported)Ú	ArrayLikeÚAxisIntÚDatetimeLikeScalarÚDtypeÚDtypeObjÚFÚInterpolateOptionsÚNpDtypeÚPositionalIndexer2DÚPositionalIndexerTupleÚScalarIndexerÚSequenceIndexerÚTimeAmbiguousÚTimeNonexistentÚnpt)Úfunction)ÚAbstractMethodErrorÚInvalidComparisonÚPandas4WarningÚPerformanceWarning)Úcache_readonly)Úfind_stack_level)Ú'construct_1d_object_array_from_listlike)Úis_all_stringsÚis_integer_dtypeÚis_list_likeÚis_object_dtypeÚis_string_dtypeÚpandas_dtype)Ú
ArrowDtypeÚCategoricalDtypeÚDatetimeTZDtypeÚExtensionDtypeÚPeriodDtype)ÚABCCategoricalÚABCMultiIndex)Úis_valid_na_for_dtypeÚisna)Ú
algorithmsÚmissingÚnanopsÚops)ÚisinÚ	map_arrayÚunique1d)Údatetimelike_accumulations)ÚOpsMixin)ÚNDArrayBackedExtensionArrayÚravel_compat)ÚArrowExtensionArray)ÚExtensionArray)ÚIntegerArray)ÚarrayÚensure_wrapped_if_datetimelikeÚextract_array)Úcheck_setitem_lengths)Úunpack_zerodim_and_defer)Úinvalid_comparisonÚmake_invalid_op)Úfrequencies)ÚCallableÚIteratorÚSequence)ÚTimeUnit©ÚIndex)ÚDatetimeArrayÚPeriodArrayÚTimedeltaArrayr   ÚDTScalarOrNaTc                ó:   — t        | «      } t        | «      |«      S ©N)rc   ra   )Úop_nameÚops     új/var/www/html/python-recuperauto-other/env/lib/python3.12/site-packages/pandas/core/arrays/datetimelike.pyÚ_make_unpacked_invalid_oprt   £   s   € Ü	˜Ó	!€BØ,Ô# GÓ,¨RÓ0Ð0ó    c                óB   ‡ — t        ‰ «      ˆ fd„«       }t        d|«      S )zâ
    For PeriodArray methods, dispatch to DatetimeArray and re-wrap the results
    in PeriodArray.  We cannot use ._ndarray directly for the affected
    methods because the i8 data has different semantics on NaT values.
    c                ó@  •— t        | j                  t        «      s ‰| g|¢­i |¤ŽS | j                  d«      } ‰|g|¢­i |¤Ž}|t        u rt        S t        |t
        «      r| j                  |j                  «      S |j                  d«      }| j                  |«      S )NúM8[ns]Úi8)	Ú
isinstanceÚdtyperJ   Úviewr   r   Ú	_box_funcÚ_valueÚ_from_backing_data)ÚselfÚargsÚkwargsÚarrÚresultÚres_i8Úmeths         €rs   Únew_methz"_period_dispatch.<locals>.new_meth¯   s�   ø€ ä˜$Ÿ*™*¤kÔ2Ù˜Ð.˜tÒ. vÑ.Ð.à�i‰i˜Ó!ˆÙ�cÐ+˜DÒ+ FÑ+ˆØ”S‰=ÜˆJÜ˜¤	Ô*Ø—>‘> &§-¡-Ó0Ð0à—‘˜TÓ"ˆØ×&Ñ& vÓ.Ð.ru   r.   )r   r   )r†   r‡   s   ` rs   Ú_period_dispatchrˆ   ¨   s*   ø€ ô ˆ4ƒ[ó/ó ð/ô ��XÓÐru   c                  óœ  ‡ — e Zd ZU dZded<   ded<   ded<   edhd„«       Z	 di	 	 	 	 	 djd„Zedkd„«       Z	dld„Z
	 	 	 	 dmd„Zdnd„Zd„ Zdod„Zdpd„Zedqd„«       Zdd	dœ	 	 	 drd„Zdsdtd„Z	 du	 	 	 	 	 dvd„Zedwd„«       Ze	 	 	 	 dxd„«       Zdyˆ fd„Z	 	 	 	 	 	 dzˆ fd„Zd{d|ˆ fd„Zed}d„«       Zed~d „«       Zedd!„«       Zed€d�d"„«       Zd‚d�ˆ fd#„Zd$„ Zd
dd%œ	 	 	 dƒd&„Zdsd„d'„Zdsd…d(„Zd)„ Zed†d*„«       Zd‡dˆˆ fd+„Z e!d‚d‰d,„«       Z"dŠd-„Z#d‹d.„Z$ed‹d/„«       Z%edhd0„«       Z&e'd	f	 	 	 dŒd1„Z(ed�d2„«       Z)edŽd3„«       Z*edhd4„«       Z+edhd5„«       Z,edhd6„«       Z-d7„ Z. e/d8«      Z0 e/d9«      Z1 e/d:«      Z2 e/d;«      Z3 e/d<«      Z4 e/d=«      Z5 e/d>«      Z6 e/d?«      Z7 e/d@«      Z8 e/dA«      Z9 e/dB«      Z: e/dC«      Z;e	 	 d�dD„«       Z<ed�dE„«       Z=ed‘dF„«       Z>e	 	 	 	 d’dG„«       Z?ed“dH„«       Z@ed”dI„«       ZAed•dJ„«       ZBdK„ ZCdL„ ZDd–dM„ZEed—dN„«       ZFed}dO„«       ZGedodP„«       ZHed˜dQ„«       ZIed™dR„«       ZJddSœdšdT„ZK eLdU«      dV„ «       ZMdW„ ZN eLdX«      dY„ «       ZOdZ„ ZPd}d[„ZQd}d\„ZReS	 	 	 	 	 	 d›ˆ fd]„«       ZTeSd	dd^œdœd_„«       ZUeSd	dd^œdœd`„«       ZVddadbœd�dc„ZWeSd	dd^œdœdd„«       ZXd{džde„ZY	 	 	 	 	 	 	 	 	 	 dŸdf„ZZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 d dg„Z[ˆ xZ\S )¡ÚDatetimeLikeArrayMixinz�
    Shared Base/Mixin class for DatetimeArray, TimedeltaArray, PeriodArray

    Assumes that __new__/__init__ defines:
        _ndarray
    zCallable[[DtypeObj], bool]Ú_is_recognized_dtypeztuple[type, ...]Ú_recognized_scalarsú
np.ndarrayÚ_ndarrayc                 ó   — y©NT© ©r€   s    rs   Ú_can_hold_naz#DatetimeLikeArrayMixin._can_hold_naÍ   s   € àru   NFc                ó   — t        | «      ‚rp   ©r9   )r€   Údatar{   ÚfreqÚcopys        rs   Ú__init__zDatetimeLikeArrayMixin.__init__Ñ   s   € ô " $Ó'Ð'ru   c                ó   — t        | «      ‚)z£
        The scalar associated with this datelike

        * PeriodArray : Period
        * DatetimeArray : Timestamp
        * TimedeltaArray : Timedelta
        r•   r’   s    rs   Ú_scalar_typez#DatetimeLikeArrayMixin._scalar_typeÖ   s   € ô " $Ó'Ð'ru   c                ó   — t        | «      ‚)ay  
        Construct a scalar type from a string.

        Parameters
        ----------
        value : str

        Returns
        -------
        Period, Timestamp, or Timedelta, or NaT
            Whatever the type of ``self._scalar_type`` is.

        Notes
        -----
        This should call ``self._check_compatible_with`` before
        unboxing the result.
        r•   ©r€   Úvalues     rs   Ú_scalar_from_stringz*DatetimeLikeArrayMixin._scalar_from_stringá   ó   € ô$ " $Ó'Ð'ru   c                ó   — t        | «      ‚)a±  
        Unbox the integer value of a scalar `value`.

        Parameters
        ----------
        value : Period, Timestamp, Timedelta, or NaT
            Depending on subclass.

        Returns
        -------
        int

        Examples
        --------
        >>> arr = pd.array(np.array(["1970-01-01"], "datetime64[ns]"))
        >>> arr._unbox_scalar(arr[0])
        np.datetime64('1970-01-01T00:00:00.000000000')
        r•   r�   s     rs   Ú_unbox_scalarz$DatetimeLikeArrayMixin._unbox_scalarõ   s   € ô* " $Ó'Ð'ru   c                ó   — t        | «      ‚)a|  
        Verify that `self` and `other` are compatible.

        * DatetimeArray verifies that the timezones (if any) match
        * PeriodArray verifies that the freq matches
        * Timedelta has no verification

        In each case, NaT is considered compatible.

        Parameters
        ----------
        other

        Raises
        ------
        Exception
        r•   ©r€   Úothers     rs   Ú_check_compatible_withz-DatetimeLikeArrayMixin._check_compatible_with  r    ru   c                ó   — t        | «      ‚)zI
        box function to get object from internal representation
        r•   )r€   Úxs     rs   r}   z DatetimeLikeArrayMixin._box_func"  s   € ô " $Ó'Ð'ru   c                óF   — t        j                  || j                  d¬«      S )z1
        apply box func to passed values
        F)Úconvert)r   Ú	map_inferr}   ©r€   Úvaluess     rs   Ú_box_valuesz"DatetimeLikeArrayMixin._box_values(  s   € ô �}‰}˜V T§^¡^¸UÔCÐCru   c                ó†   ‡ — ‰ j                   dkD  rˆ fd„t        t        ‰ «      «      D «       S ˆ fd„‰ j                  D «       S )Né   c              3  ó(   •K  — | ]	  }‰|   –— Œ y ­wrp   r‘   )Ú.0Únr€   s     €rs   ú	<genexpr>z2DatetimeLikeArrayMixin.__iter__.<locals>.<genexpr>0  s   øè ø€ Ò6 �D˜•GÑ6ùs   ƒc              3  ó@   •K  — | ]  }‰j                  |«      –— Œ y ­wrp   )r}   )r²   Úvr€   s     €rs   r´   z2DatetimeLikeArrayMixin.__iter__.<locals>.<genexpr>2  s   øè ø€ Ò9¨!�D—N‘N 1×%Ñ9ùs   ƒ)ÚndimÚrangeÚlenÚasi8r’   s   `rs   Ú__iter__zDatetimeLikeArrayMixin.__iter__.  s1   ø€ Ø�9‰9�qŠ=Û6¤U¬3¨t«9Ó%5Ô6Ð6ã9¨t¯y©yÔ9Ð9ru   c                ó8   — | j                   j                  d«      S )z‘
        Integer representation of the values.

        Returns
        -------
        ndarray
            An ndarray with int64 dtype.
        ry   )rŽ   r|   r’   s    rs   rº   zDatetimeLikeArrayMixin.asi84  s   € ð �}‰}×!Ñ! $Ó'Ð'ru   r   )Úna_repÚdate_formatc               ó   — t        | «      ‚)z|
        Helper method for astype when converting to strings.

        Returns
        -------
        ndarray[str]
        r•   )r€   r½   r¾   s      rs   Ú_format_native_typesz+DatetimeLikeArrayMixin._format_native_typesD  s   € ô " $Ó'Ð'ru   c                ó   — dj                   S )Nz'{}')Úformat)r€   Úboxeds     rs   Ú
_formatterz!DatetimeLikeArrayMixin._formatterP  s   € à�}‰}Ðru   c                ó>  — t        |«      r3|du rt        d«      ‚t        j                  t	        | «      t
        ¬«      S |du r!t        j                  | j                  |¬«      S | j                  }| j                  r!|j                  «       }d|j                  _
        |S )NFz:Unable to avoid copy while creating an array as requested.©r{   T)rC   Ú
ValueErrorÚnpr]   ÚlistÚobjectrŽ   Ú	_readonlyr|   ÚflagsÚ	writeable)r€   r{   r˜   r„   s       rs   Ú	__array__z DatetimeLikeArrayMixin.__array__W  s‚   € ô ˜5Ô!Ø�u‰}Ü ØPóð ô —8‘8œD ›J¬fÔ5Ð5à�4‰<Ü—8‘8˜DŸM™M°Ô7Ð7à—‘ˆØ�>Š>Ø—[‘[“]ˆFØ%*ˆF�L‰LÔ"Øˆru   c                 ó   — y rp   r‘   ©r€   Úkeys     rs   Ú__getitem__z"DatetimeLikeArrayMixin.__getitem__k  ó   € Ø@Cru   c                 ó   — y rp   r‘   rÐ   s     rs   rÒ   z"DatetimeLikeArrayMixin.__getitem__n  s   € ð ru   c                ó€   •— t        dt        ‰| �	  |«      «      }t        j                  |«      r|S t        d|«      }|S )z’
        This getitem defers to the underlying array, which by-definition can
        only handle list-likes, slices, and integer scalars
        úSelf | DTScalarOrNaTr
   )r   ÚsuperrÒ   r   Ú	is_scalar)r€   rÑ   r„   Ú	__class__s      €rs   rÒ   z"DatetimeLikeArrayMixin.__getitem__t  s@   ø€ ô Ð,¬e©gÑ.AÀ#Ó.FÓGˆÜ�=‰=˜Ô ØˆMô ˜& &Ó)ˆFØˆru   c                ó@   •— t        ||| «       t        ‰| �	  ||«       y rp   )r`   r×   Ú__setitem__)r€   rÑ   rž   rÙ   s      €rs   rÛ   z"DatetimeLikeArrayMixin.__setitem__‡  s"   ø€ ô 	˜c 5¨$Ô/ô 	‰Ñ˜C Õ'ru   Tc                ó`  •— t        |«      }|t        k(  rÈ| j                  j                  dk(  r=t	        d| «      } | j
                  }t        || j                  d| j                  ¬«      }|S | j                  j                  dk(  rt        | j                  d¬«      S | j                  | j
                  j                  «       «      j                  | j                  «      S t        |«      r`t!        |t"        «      r@| j%                  |j&                  ¬«      }|j)                  «       }|j+                  ||d	¬
«      S | j%                  «       S t!        |t"        «      rt,        ‰	| �]  ||¬«      S |j                  dv rO| j
                  }|t0        j2                  k7  rt5        d| j                  › d|› d�«      ‚|r|j7                  «       }|S |j                  dv r| j                  |k7  s|j                  dk(  r&dt9        | «      j:                  › d|› �}t5        |«      ‚t1        j<                  | |¬«      S )NÚMrk   Ú	timestamp)ÚtzÚboxÚresoÚmT)rà   )r½   F)r{   r˜   ©r˜   ÚiuzConverting from z to z? is not supported. Do obj.astype('int64').astype(dtype) insteadÚmMÚfzCannot cast z
 to dtype rÆ   )rE   rÊ   r{   Úkindr   rº   r!   rß   Ú_cresor"   rŽ   r®   ÚravelÚreshapeÚshaperD   rz   rI   rÀ   Úna_valueÚconstruct_array_typeÚ_from_sequencer×   ÚastyperÈ   Úint64Ú	TypeErrorr˜   ÚtypeÚ__name__Úasarray)
r€   r{   r˜   Úi8dataÚ	convertedÚ
arr_objectÚclsr­   ÚmsgrÙ   s
            €rs   rï   zDatetimeLikeArrayMixin.astype˜  sè  ø€ ô
 ˜UÓ#ˆà”FŠ?Ø�z‰z�‰ #Ò%Ü˜O¨TÓ2�ð Ÿ™�Ü.ØØ—w‘wØ#ØŸ™ô	�	ð !Ð à—‘—‘ CÒ'Ü*¨4¯=©=¸dÔCÐCà×#Ñ# D§I¡I§O¡OÓ$5Ó6×>Ñ>¸t¿z¹zÓJÐJä˜UÔ#Ü˜%¤Ô0Ø!×6Ñ6¸e¿n¹nÐ6ÓM�
Ø×0Ñ0Ó2�Ø×)Ñ)¨*¸EÈÐ)ÓNÐNà×0Ñ0Ó2Ð2ä˜œ~Ô.Ü‘7‘> %¨d�>Ó3Ð3Ø�Z‰Z˜4Ñð —Y‘YˆFØœŸ™Ò ÜØ& t§z¡z l°$°u°gð >Cð Cóð ñ
 ØŸ™›�ØˆMØ�j‰j˜DÑ  T§Z¡Z°5Ò%8¸U¿Z¹ZÈ3Ò=Nð !¤ d£×!4Ñ!4Ð 5°ZÀ¸wÐGˆCÜ˜C“.Ð ä—:‘:˜d¨%Ô0Ð0ru   c                 ó   — y rp   r‘   r’   s    rs   r|   zDatetimeLikeArrayMixin.viewÑ  s   € Øru   c                 ó   — y rp   r‘   ©r€   r{   s     rs   r|   zDatetimeLikeArrayMixin.viewÔ  s   € Ø?Bru   c                 ó   — y rp   r‘   rü   s     rs   r|   zDatetimeLikeArrayMixin.view×  rÓ   ru   c                 ó   — y rp   r‘   rü   s     rs   r|   zDatetimeLikeArrayMixin.viewÚ  s   € Ø<?ru   c                ó"   •— t         ‰| �  |«      S rp   )r×   r|   )r€   r{   rÙ   s     €rs   r|   zDatetimeLikeArrayMixin.viewÝ  s   ø€ ô ‰w‰|˜EÓ"Ð"ru   c                ó~  — t        |t        «      r	 | j                  |«      }t        || j                  «      s|t        u r%| j                  |«      }	 | j                  |«       |S t        |«      st        |«      ‚t        |«      t        | «      k7  rt        d«      ‚	 | j                  |d¬«      }| j                  |«       |S # t        t        f$ r}t        |«      |‚d }~ww xY w# t        $ r}t        |«      |‚d }~ww xY w# t        $ r.}t        t        |dd «      «      rnt        |«      |‚Y d }~|S d }~ww xY w)NzLengths must matchT)Úallow_objectr{   )rz   ÚstrrŸ   rÇ   r   r:   rŒ   r   r›   r¦   rñ   rB   r¹   Ú_validate_listlikerC   Úgetattr)r€   r¥   Úerrs      rs   Ú_validate_comparison_valuez1DatetimeLikeArrayMixin._validate_comparison_valueæ  sG  € Ü�eœSÔ!ð8à×0Ñ0°Ó7�ô
 �e˜T×5Ñ5Ô6¸%Ä3¹,ð ×%Ñ% eÓ,ˆEð8Ø×+Ñ+¨EÔ2ð, ˆô# ˜eÔ$Ü# EÓ*Ð*ä�‹Zœ3˜t›9Ò$ÜÐ1Ó2Ð2ð<Ø×/Ñ/°ÀDÐ/ÓI�Ø×+Ñ+¨EÔ2ð ˆøôA Ô 5Ð6ò 8ä'¨Ó.°CÐ7ûð8ûô ò 8ä'¨Ó.°CÐ7ûð8ûô ò <Ü"¤7¨5°'¸4Ó#@ÔAàä+¨EÓ2¸Ð;ó ð ˆûð<úsG   ’C ÁC( Â$D ÃC%ÃC Ã C%Ã(	DÃ1C=Ã=DÄ	D<Ä#D7Ä7D<)Úallow_listlikeÚunboxc               ó  — t        || j                  «      rn­t        |t        «      r	 | j                  |«      }nŠt        || j                  «      rt        }nmt        |«      r| j                  ||«      }t        |«      ‚t        || j                  «      r| j                  |«      }n| j                  ||«      }t        |«      ‚|s|S | j                  |«      S # t        $ r#}| j                  ||«      }t        |«      |‚d}~ww xY w)a  
        Validate that the input value can be cast to our scalar_type.

        Parameters
        ----------
        value : object
        allow_listlike: bool, default False
            When raising an exception, whether the message should say
            listlike inputs are allowed.
        unbox : bool, default True
            Whether to unbox the result before returning.  Note: unbox=False
            skips the setitem compatibility check.

        Returns
        -------
        self._scalar_type or NaT
        N)rz   r›   r  rŸ   rÇ   Ú_validation_error_messagerñ   rM   r{   r   rN   rŒ   r¢   )r€   rž   r  r  r  rù   s         rs   Ú_validate_scalarz'DatetimeLikeArrayMixin._validate_scalar  sû   € ô0 �e˜T×.Ñ.Ô/Øä˜œsÔ#ð.Ø×0Ñ0°Ó7‘ô
 # 5¨$¯*©*Ô5ä‰Eä�%Œ[ð ×0Ñ0°¸ÓGˆCÜ˜C“.Ð ä˜˜t×7Ñ7Ô8ð ×%Ñ% eÓ,‰Eð ×0Ñ0°¸ÓGˆCÜ˜C“.Ð áð ˆLØ×!Ñ! %Ó(Ð(øô9 ò .Ø×4Ñ4°U¸NÓK�Ü “n¨#Ð-ûð.ús   ©C Ã	DÃ#DÄDc                ó  — t        |d«      r t        |dd«      dkD  r|j                  › d�}ndt        |«      j                  › d�}|rd| j
                  j                  › d|› d�}|S d| j
                  j                  › d	|› d�}|S )
a+  
        Construct an exception message on validation error.

        Some methods allow only scalar inputs, while others allow either scalar
        or listlike.

        Parameters
        ----------
        allow_listlike: bool, default False

        Returns
        -------
        str
        r{   r·   r   z arrayú'zvalue should be a 'z!', 'NaT', or array of those. Got z	 instead.z' or 'NaT'. Got )Úhasattrr  r{   rò   ró   r›   )r€   rž   r  Úmsg_gotrù   s        rs   r
  z0DatetimeLikeArrayMixin._validation_error_messageJ  s°   € ô �5˜'Ô"¤w¨u°f¸aÓ'@À1Ò'DØŸ™˜ VÐ,‰Gàœ$˜u›+×.Ñ.Ð/¨qÐ1ˆGÙà% d×&7Ñ&7×&@Ñ&@Ð%Að B*Ø*1¨°)ð=ð ð ˆ
ð & d×&7Ñ&7×&@Ñ&@Ð%Að BØ�i˜yð*ð ð ˆ
ru   c                óØ  — t        |t        | «      «      rR| j                  j                  dv r8|s6| j                  |j                  k7  r|j                  | j                  d¬«      }|S t        |t        «      r4t        |«      dk(  r&t        | «      j                  g | j                  ¬«      S t        |d«      �rw|j                  t        k(  �rct        j                  |«      }|j                  dk7  r|j                  «       n|}t        j                   |d| j                  ¬	«      }t#        |«      }t        |t        | «      «      r|| j                  j                  dv r8|s6| j                  |j                  k7  r|j                  | j                  d¬«      }|j                  dk7  r|j%                  |j&                  «      }|S | j                  j                  d
k(  rVt        j(                  |«      dk(  r>t+        j,                  dt.        t1        «       ¬«       t        | «      j                  |«      }t        |t        «      rt3        |«      }t        |t        j4                  «      r5|j                  t        k(  r"t        j                   |d| j                  ¬	«      }t7        |d¬«      }t9        |«      }t7        |d¬«      }t;        |«      r'	 t        | «      j                  || j                  ¬«      }t        |j                  t>        «      r@|j@                  j                  | j                  k(  r|jC                  «       }t7        |d¬«      }|rtE        |j                  «      rnAt        | «      jG                  |j                  «      s| jI                  |d«      }tK        |«      ‚| j                  j                  dv r|s|j                  | j                  d¬«      }|S # t<        $ r Y Œ÷w xY w)Nrå   F©Úround_okr   rÆ   r{   r°   T©Úconvert_non_numericÚdtype_if_all_natrÝ   Údatez¿Inferring datetime64 from data containing datetime.date objects is deprecated. In a future version, these will be left as object dtype. Use pd.to_datetime to explicitly convert to datetime64.©Ú
stacklevel©Úextract_numpy)&rz   rò   r{   rç   ÚunitÚas_unitrÉ   r¹   rî   r  rÊ   rÈ   rô   r·   ré   r   Úmaybe_convert_objectsr^   rê   rë   Úinfer_dtypeÚwarningsÚwarnr;   r>   r?   Úndarrayr_   Úpd_arrayr@   rÇ   rG   Ú
categoriesÚ_internal_get_valuesrC   r‹   r
  rñ   )r€   rž   r  rƒ   Úflatrö   rù   s          rs   r  z)DatetimeLikeArrayMixin._validate_listlikei  s  € Ü�eœT $›ZÔ(Ø�z‰z�‰ $Ñ&©|ÀÇ	Á	ÈUÏZÉZÒ@WàŸ™ d§i¡i¸%˜Ó@�ØˆLä�eœTÔ"¤s¨5£z°Q¢ä˜“:×,Ñ,¨R°t·z±zÐ,ÓBÐBä�5˜'Õ" u§{¡{´fÓ'<ô —*‘*˜UÓ#ˆCØ"%§(¡(¨a¢-�3—9‘9”;°SˆDÜ×1Ñ1Ø¨$ÀÇÁôˆIô 7°yÓAˆIÜ˜)¤T¨$£ZÔ0à—J‘J—O‘O tÑ+Ù(ØŸ	™	 Y§^¡^Ò3à )× 1Ñ 1°$·)±)ÀeÐ 1Ó L�IØ—8‘8˜q’=Ø )× 1Ñ 1°#·)±)Ó <�IØ Ð Ø—‘—‘ CÒ'¬C¯O©O¸EÓ,BÀfÒ,Lä—‘ð%ô
 #Ü/Ó1õô ˜T›
×1Ñ1°%Ó8�ä�eœTÔ"Ü;¸EÓBˆEÜ�eœRŸZ™ZÔ(¨U¯[©[¼FÒ-Bô ×-Ñ-Ø¨4À$Ç*Á*ôˆEô ˜e°4Ô8ˆÜ˜“ˆÜ˜e°4Ô8ˆä˜%Ô ðô ˜T›
×1Ñ1°%¸t¿z¹zÐ1ÓJ�ô �e—k‘kÔ#3Ô4à×Ñ×%Ñ%¨¯©Ò3à×2Ñ2Ó4�Ü% e¸4Ô@�áœO¨E¯K©KÔ8Øä�d“×0Ñ0°·±Ô=Ø×0Ñ0°¸Ó=ˆCÜ˜C“.Ð à�:‰:�?‰?˜dÑ"©<à—M‘M $§)¡)°e�MÓ<ˆEØˆøô) ò Ùðús   Ë&O Ï	O)Ï(O)c                ó„   — t        |«      r| j                  |«      }n| j                  |d¬«      S | j                  |«      S )NT)r  )rB   r  r  Ú_unboxr�   s     rs   Ú_validate_setitem_valuez.DatetimeLikeArrayMixin._validate_setitem_value¿  s?   € Ü˜ÔØ×+Ñ+¨EÓ2‰Eà×(Ñ(¨¸tÐ(ÓDÐDà�{‰{˜5Ó!Ð!ru   c                ó�   — t        j                  |«      r| j                  |«      }|S | j                  |«       |j                  }|S )zZ
        Unbox either a scalar with _unbox_scalar or an instance of our own type.
        )r   rØ   r¢   r¦   rŽ   r¤   s     rs   r'  zDatetimeLikeArrayMixin._unboxÇ  sE   € ô
 �=‰=˜ÔØ×&Ñ& uÓ-ˆEð
 ˆð ×'Ñ'¨Ô.Ø—N‘NˆEØˆru   c                ól  •— t        j                  |«      rø| j                  s|r| j                  «       S | d d  S 	 | j	                  |«      }|r| j
                  j                  «       }n#| j                  rt        d«      ‚| j
                  }|j                  d«      }t        j                  ||j                  ¬«      j                  d«      d   }t        j                  ||d|¬«       t        | «      j                  || j                  ¬«      S t"        ‰| �I  |||¬«      S # t        t         f$ r Y Œ#w xY w)NzCannot modify read-only arrayry   rÆ   r‘   T)Úis_datetimelikeÚlimit)r,  r˜   )r   rØ   Ú_hasnar˜   r(  rŽ   rË   rÇ   r|   rÈ   r]   r{   r   Úscalar_fillna_inplacerò   Ú_simple_newrñ   r×   Úfillna)	r€   rž   r,  r˜   Ú	validatedÚnew_ndarrayÚarr_i8Úfill_i8rÙ   s	           €rs   r0  zDatetimeLikeArrayMixin.fillnaÔ  s  ø€ ä�=‰=˜ÔØ—;’;Ù&*�t—y‘y“{Ð7°±Q°Ð7ðMØ ×8Ñ8¸Ó?�	ñ Ø"&§-¡-×"4Ñ"4Ó"6‘Kà—~’~Ü(Ð)HÓIÐIØ"&§-¡-�Kà$×)Ñ)¨$Ó/�ÜŸ(™( 9°K×4EÑ4EÔF×KÑKÈDÓQÐRTÑU�Ü×+Ñ+Ø˜G°TÀõô ˜D“z×-Ñ-¨kÀÇÁÐ-ÓLÐLä‰w‰~˜e¨5°tˆ~Ó<Ð<øô% ¤	Ð*ò Ùðús   »D! Ä!D3Ä2D3c                ó’   — ddl m} t        | ||¬«      } ||«      }t        |t        «      r|j                  «       S |j                  S )Nr   ri   )Ú	na_action)Úpandasrj   rT   rz   rL   Úto_numpyr]   )r€   Úmapperr6  rj   r„   s        rs   ÚmapzDatetimeLikeArrayMixin.mapô  s=   € å ä˜4 °9Ô=ˆÙ�v“ˆä�fœmÔ,Ø—?‘?Ó$Ð$à—<‘<Ðru   c                ó>  — |j                   j                  dv r%t        j                  | j                  t
        ¬«      S t        |«      }t        |t        | «      «      s�|j                   t        k(  ret        j                  |d| j                   ¬«      }|j                   t        k7  r| j                  |«      S t        | j                  t        «      |«      S t        j                  | j                  t
        ¬«      S | j                   j                  dv r t        d| «      } | j                  |«      \  } }	 | j!                  |«       t        | j&                  |j&                  «      S # t"        t$        f$ r( t        j                  | j                  t
        ¬«      cY S w xY w)z÷
        Compute boolean array of whether each value is found in the
        passed set of values.

        Parameters
        ----------
        values : np.ndarray or ExtensionArray

        Returns
        -------
        ndarray[bool]
        ÚfiucrÆ   Tr  rå   úDatetimeArray | TimedeltaArray)r{   rç   rÈ   Úzerosrë   Úboolr^   rz   rò   rÊ   r   r  rS   rï   r   Ú_ensure_matching_resosr¦   rñ   rÇ   rº   r¬   s     rs   rS   zDatetimeLikeArrayMixin.isin   s@  € ð �<‰<×Ñ Ñ&ä—8‘8˜DŸJ™J¬dÔ3Ð3ä/°Ó7ˆä˜&¤$ t£*Ô-Ø�|‰|œvÒ%Ü×2Ñ2ØØ(,Ø%)§Z¡Zô�ð
 —<‘<¤6Ò)ØŸ9™9 VÓ,Ð,ô   §¡¬FÓ 3°VÓ<Ð<Ü—8‘8˜DŸJ™J¬dÔ3Ð3à�:‰:�?‰?˜dÑ"ÜÐ8¸$Ó?ˆDð  ×6Ñ6°vÓ>‰LˆD�&ð	4ð ×'Ñ'¨Ô/ô �D—I‘I˜vŸ{™{Ó+Ð+øô œ:Ð&ò 	4ä—8‘8˜DŸJ™J¬dÔ3Ò3ð	4ús   Ä4E% Å%4FÆFc                ó   — | j                   S rp   )Ú_isnanr’   s    rs   rN   zDatetimeLikeArrayMixin.isna8  s   € Ø�{‰{Ðru   c                ó(   — | j                   t        k(  S )z-
        return if each value is nan
        )rº   r    r’   s    rs   rB  zDatetimeLikeArrayMixin._isnan;  s   € ð
 �y‰yœDÑ Ð ru   c                óH   — t        | j                  j                  «       «      S )zJ
        return if I have any nans; enables various perf speedups
        )r?  rB  Úanyr’   s    rs   r-  zDatetimeLikeArrayMixin._hasnaB  s   € ô
 �D—K‘K—O‘OÓ%Ó&Ð&ru   c                óª   — | j                   rF|r|j                  |«      }|€t        j                  }t        j                  || j
                  |«       |S )az  
        Parameters
        ----------
        result : np.ndarray
        fill_value : object, default iNaT
        convert : str, dtype or None

        Returns
        -------
        result : ndarray with values replace by the fill_value

        mask the result if needed, convert to the provided dtype if its not
        None

        This is an internal routine.
        )r-  rï   rÈ   ÚnanÚputmaskrB  )r€   r„   Ú
fill_valuerª   s       rs   Ú_maybe_mask_resultsz*DatetimeLikeArrayMixin._maybe_mask_resultsI  sD   € ð& �;Š;ÙØŸ™ wÓ/�ØÐ!ÜŸV™V�
Ü�J‰J�v˜tŸ{™{¨JÔ7Øˆru   c                ól   — | j                   dk7  ry	 t        j                  | «      S # t        $ r Y yw xY w)zP
        Internal version of inferred_freq without deprecation warning.
        r°   N)r·   rd   Úinfer_freq_strrÇ   r’   s    rs   Ú_inferred_freq_strz)DatetimeLikeArrayMixin._inferred_freq_strg  s:   € ð
 �9‰9˜Š>Øð	Ü×-Ñ-¨dÓ3Ð3øÜò 	Ùð	ús   ’' §	3²3c                óB   — t        j                  | j                  d«      S )a3  
        Tries to return a string representing a frequency generated by infer_freq.

        .. deprecated:: 3.1.0
            A future version of pandas will return a :class:`BaseOffset` instead of
            a string. Use
            ``pd.set_option('future.infer_freq_returns_offset', True)`` to opt
            in to the future behavior.

        Returns None if it can't autodetect the frequency.

        See Also
        --------
        DatetimeIndex.freqstr : Return the frequency object as a string if it's set,
            otherwise None.

        Examples
        --------
        For DatetimeIndex:

        >>> idx = pd.DatetimeIndex(["2018-01-01", "2018-01-03", "2018-01-05"])
        >>> idx.inferred_freq  # doctest: +SKIP
        '2D'

        For TimedeltaIndex:

        >>> tdelta_idx = pd.to_timedelta(["0 days", "10 days", "20 days"])
        >>> tdelta_idx
        TimedeltaIndex(['0 days', '10 days', '20 days'],
                       dtype='timedelta64[us]', freq=None)
        >>> tdelta_idx.inferred_freq  # doctest: +SKIP
        '10D'
        Úinferred_freq)rd   Úmaybe_convert_inferred_freqrM  r’   s    rs   rO  z$DatetimeLikeArrayMixin.inferred_freqs  s#   € ôF ×6Ñ6Ø×#Ñ# _ó
ð 	
ru   c                óJ   — t        j                  | j                  d¬«      d   S )NT©Útimeliker   ©r   Úis_monotonicrº   r’   s    rs   Ú_is_monotonic_increasingz/DatetimeLikeArrayMixin._is_monotonic_increasing�  ó   € ä×!Ñ! $§)¡)°dÔ;¸AÑ>Ð>ru   c                óJ   — t        j                  | j                  d¬«      d   S )NTrR  r°   rT  r’   s    rs   Ú_is_monotonic_decreasingz/DatetimeLikeArrayMixin._is_monotonic_decreasing¡  rW  ru   c                óv   — t        t        | j                  j                  d«      «      «      | j                  k(  S )NÚK)r¹   rU   rº   ré   Úsizer’   s    rs   Ú
_is_uniquez!DatetimeLikeArrayMixin._is_unique¥  s(   € ä”8˜DŸI™IŸO™O¨CÓ0Ó1Ó2°d·i±iÑ?Ð?ru   c                óê  — | j                   dkD  rXt        |dd «      | j                  k(  r> || j                  «       |j                  «       «      j	                  | j                  «      S t        |«      rut        |t        t        j                  t        f«      sPt        j                  |«      s;t        j                  dt        |«      j                   › d�t"        t%        «       ¬«       	 | j'                  |«      }t        |dd «      }t5        |«      r?t        j6                  |t        j8                  | j;                  t<        «      «      |«      }|S |t>        u r`|t@        jB                  u r't        jD                  | j                  tF        ¬«      }|S t        jH                  | j                  tF        ¬«      }|S t        | j,                  tJ        «      s|tM        d| «      } | jN                  |jN                  k7  rWt        |t        | «      «      s	 |jQ                  | jR                  d	¬
«      }n#|j\                  }t[        | j\                  ||«      S | j_                  |«      } || j\                  ja                  d«      |ja                  d«      «      }tc        |«      }| jd                  |z  }|jg                  «       r)|t@        jB                  u }	t        jh                  |||	«       |S # t(        $ r> t+        |d«      r"t        |j,                  t.        «      rt0        cY S t3        | ||«      cY S w xY w# tT        $ r9 t        jV                  |jX                  «      }t[        | j\                  ||«      cY S w xY w)Nr°   rë   zOperation with zŠ is deprecated. In a future version these will be treated as scalar-like. To retain the old behavior, explicitly wrap in a Series instead.r  r{   rÆ   ÚTimelikeOpsFr  ry   )5r·   r  rë   ré   rê   rB   rz   rÉ   rÈ   r!  r[   rR   Úhas_castable_attrr  r   rò   ró   r;   r>   r  r:   r  r{   rF   ÚNotImplementedrb   rC   Úcomp_method_OBJECT_ARRAYrô   rï   rÊ   r   ÚoperatorÚneÚonesr?  r>  rJ   r   rè   r  r  rÇ   r]   Úasm8r&   rŽ   r'  r|   rN   rB  rE  rH  )
r€   r¥   rr   r{   r„   Ú	other_arrÚ
other_valsÚo_maskÚmaskÚ
nat_results
             rs   Ú_cmp_methodz"DatetimeLikeArrayMixin._cmp_method¬  s±  € Ø�9‰9�qŠ=œW U¨G°TÓ:¸d¿j¹jÒHá�d—j‘j“l E§K¡K£MÓ2×:Ñ:¸4¿:¹:ÓFÐFä˜ÔÜØœœbŸj™j¬.Ð9ôä×+Ñ+¨EÔ2Ü—‘Ø%¤d¨5£k×&:Ñ&:Ð%;ð <ð ô #Ü/Ó1õð	7Ø×3Ñ3°EÓ:ˆEô ˜˜w¨Ó-ˆÜ˜5Ô!ô ×1Ñ1Ø”B—J‘J˜tŸ{™{¬6Ó2Ó3°UóˆFð ˆMØ”C‰<Ø”X—[‘[Ñ ÜŸ™ §¡´4Ô8�ð ˆMô Ÿ™ $§*¡*´DÔ9�ØˆMä˜$Ÿ*™*¤kÔ2Ü˜ tÓ,ˆDØ�{‰{˜eŸl™lÒ*Ü! %¬¨d«Ô4ðà %§¡¨d¯i©iÀ% Ó H™ð !&§¡�IÜ9¸$¿-¹-ÈÐTVÓWÐWà—[‘[ Ó'ˆ
á�D—M‘M×&Ñ& tÓ,¨j¯o©o¸dÓ.CÓDˆä�e“ˆØ�{‰{˜VÑ#ˆØ�8‰8Œ:ØœxŸ{™{Ð*ˆJÜ�J‰J�v˜t ZÔ0àˆøôa !ò 	7Ü�u˜gÔ&¬:°e·k±kÄ:Ô+NÜ%Ò%Ü% d¨E°2Ó6Ò6ð	7ûô: &ò Ü$&§H¡H¨U¯Z©ZÓ$8˜	Ü=Ø ŸM™M¨9°bó ò ðús*   Ã)K& ÈL0 Ë&5L-ÌL-Ì,L-Ì0?M2Í1M2Ú__pow__Ú__rpow__Ú__mul__Ú__rmul__Ú__truediv__Ú__rtruediv__Ú__floordiv__Ú__rfloordiv__Ú__mod__Ú__rmod__Ú
__divmod__Ú__rdivmod__c                óÎ   — t        |t        «      r|j                  }d}||fS t        |t        t        f«      r|j
                  }d}||fS |j                  }|j                  }||fS )zN
        Get the int64 values and b_mask to pass to add_overflowsafe.
        N)rz   r   Úordinalr   r   r~   rB  rº   )r€   r¥   Úi8valuesrj  s       rs   Ú_get_i8_values_and_maskz.DatetimeLikeArrayMixin._get_i8_values_and_mask  sq   € ô �eœVÔ$Ø—}‘}ˆHØˆDð ˜ˆ~Ðô ˜¤	¬9Ð5Ô6Ø—|‘|ˆHØˆDð
 ˜ˆ~Ðð —<‘<ˆDØ—z‘zˆHØ˜ˆ~Ðru   c                óv  — t        j                  | j                  d«      s7t        dt	        | «      j
                  › dt	        |«      j
                  › �«      ‚t        d| «      } ddlm} ddl	m
} |t        usJ ‚t        |«      r\| j                  t        j                  «       j                  d| j                   › d	�«      z   } |j"                  ||j                  ¬
«      S t%        |«      }| j'                  |«      \  } }t        d| «      } | j)                  |«      \  }}t+        | j,                  t/        j0                  |d¬
«      «      }|j3                  d| j                   › d	�«      } ||j4                  | j                   ¬«      }|j3                  d| j                   › d	�«      } |j"                  ||¬
«      S )Nrâ   úcannot add ú and rm   r   ©rk   )Útz_to_dtypezM8[ú]rÆ   ry   ©rß   r  )r   Úis_np_dtyper{   rñ   rò   ró   r   Úpandas.core.arraysrk   Úpandas.core.arrays.datetimesr�  r   rN   rŽ   Úto_datetime64rï   r  r/  r   r@  r|  r   rº   rÈ   rô   r|   rß   )	r€   r¥   rk   r�  r„   Úother_i8ri  Ú
res_valuesr{   s	            rs   Ú_add_datetimelike_scalarz/DatetimeLikeArrayMixin._add_datetimelike_scalar  sv  € ä�‰˜tŸz™z¨3Ô/ÜØœd 4›j×1Ñ1Ð2°%¼¸U»×8LÑ8LÐ7MÐNóð ô Ð$ dÓ+ˆå4Ý<àœCÑÐÐÜ�Œ;ð —]‘]¤S×%6Ñ%6Ó%8×%?Ñ%?À#ÀdÇiÁiÀ[ÐPQÐ@RÓ%SÑSˆFà,�=×,Ñ,¨V¸6¿<¹<ÔHÐHä˜%Ó ˆØ×1Ñ1°%Ó8‰ˆˆeÜÐ$ dÓ+ˆà×7Ñ7¸Ó>Ñˆ�&Ü! $§)¡)¬R¯Z©Z¸ÈÔ-MÓNˆØ—[‘[ 3 t§y¡y k°Ð!3Ó4ˆ
á˜uŸx™x¨d¯i©iÔ8ˆØ—[‘[ 3 t§y¡y k°Ð!3Ó4ˆ
Ø(ˆ}×(Ñ(¨¸5ÔAÐAru   c                óº   — t        j                  | j                  d«      s7t        dt	        | «      j
                  › dt	        |«      j
                  › �«      ‚|| z   S )Nrâ   r~  r  )r   r„  r{   rñ   rò   ró   r¤   s     rs   Ú_add_datetime_arraylikez.DatetimeLikeArrayMixin._add_datetime_arraylike5  sS   € ä�‰˜tŸz™z¨3Ô/ÜØœd 4›j×1Ñ1Ð2°%¼¸U»×8LÑ8LÐ7MÐNóð ð
 �t‰|Ðru   c                ó  — | j                   j                  dk7  r!t        dt        | «      j                  › �«      ‚t        d| «      } t        |«      r	| t        z
  S t        |«      }| j                  |«      \  } }| j                  |«      S )NrÝ   ú"cannot subtract a datelike from a rk   )r{   rç   rñ   rò   ró   r   rN   r   r   r@  Ú_sub_datetimelike)r€   r¥   Útss      rs   Ú_sub_datetimelike_scalarz/DatetimeLikeArrayMixin._sub_datetimelike_scalar?  s€   € ð �:‰:�?‰?˜cÒ!ÜÐ@ÄÀdÃ×ATÑATÐ@UÐVÓWÐWä�O TÓ*ˆô �Œ;àœ#‘:Ðä�uÓˆà×.Ñ.¨rÓ2‰ˆˆbØ×%Ñ% bÓ)Ð)ru   c                ó  — | j                   j                  dk7  r!t        dt        | «      j                  › �«      ‚t        | «      t        |«      k7  rt        d«      ‚t        d| «      } | j                  |«      \  } }| j                  |«      S )NrÝ   rŽ  ú$cannot add indices of unequal lengthrk   )
r{   rç   rñ   rò   ró   r¹   rÇ   r   r@  r�  r¤   s     rs   Ú_sub_datetime_arraylikez.DatetimeLikeArrayMixin._sub_datetime_arraylikeR  s}   € à�:‰:�?‰?˜cÒ!ÜÐ@ÄÀdÃ×ATÑATÐ@UÐVÓWÐWäˆt‹9œ˜E›
Ò"ÜÐCÓDÐDä�O TÓ*ˆà×1Ñ1°%Ó8‰ˆˆeØ×%Ñ% eÓ,Ð,ru   c                óÀ  — t        d| «      } ddlm} 	 | j                  |«       | j                  |«      \  }}t        | j                  t        j                  | d¬«      «      }|j                  d| j                  › d	�«      } |j                  ||j                   ¬«      S # t        $ r2}t        |«      j                  dd«      } t        |«      |«      |‚d }~ww xY w)
Nrk   r   ©rm   ÚcompareÚsubtractry   rÆ   útimedelta64[r‚  )r   r…  rm   Ú_assert_tzawareness_compatrñ   r  Úreplacerò   r|  r   rº   rÈ   rô   r|   r  r/  r{   )	r€   r¥   rm   r  Únew_messagerˆ  ri  r‰  Úres_m8s	            rs   r�  z(DatetimeLikeArrayMixin._sub_datetimelike_  sÇ   € ä�O TÓ*ˆå5ð	2Ø×+Ñ+¨EÔ2ð
  ×7Ñ7¸Ó>Ñˆ�&Ü% d§i¡i´·±¸X¸IÈTÔ1RÓSˆ
Ø—‘ <°·	±	¨{¸!Ð!<Ó=ˆà)ˆ~×)Ñ)¨&¸¿¹ÔEÐEøô ò 	2Ü˜c›(×*Ñ*¨9°jÓAˆKØ”$�s“)˜KÓ(¨cÐ1ûð	2ús   ”B" Â"	CÂ+-CÃCc                ó,  — t        j                  | j                  d«      s!t        dt	        | «      j
                  › �«      ‚ddlm} t        j                  |j                  | j                  «      }t        |j                  «      } |||¬«      }|| z   S )Nrâ   zcannot add Period to a r   )rl   rÆ   )r   r„  r{   rñ   rò   ró   Úpandas.core.arrays.periodrl   rÈ   Úbroadcast_torz  rë   rJ   r—   )r€   r¥   rl   Úi8valsr{   Úparrs         rs   Ú_add_periodz"DatetimeLikeArrayMixin._add_periodq  ss   € ä�‰˜tŸz™z¨3Ô/ÜÐ5´d¸4³j×6IÑ6IÐ5JÐKÓLÐLõ 	:ä—‘ §¡°·
±
Ó;ˆÜ˜EŸJ™JÓ'ˆÙ˜6¨Ô/ˆØ�d‰{Ðru   c                ó   — t        | «      ‚rp   r•   )r€   Úoffsets     rs   Ú_add_offsetz"DatetimeLikeArrayMixin._add_offset~  ó   € Ü! $Ó'Ð'ru   c                óŽ  — t        |«      rt        j                  | j                  d¬«      j	                  | j
                  j                  «      }|j                  t        «       t        | «      j                  || j                  ¬«      S t        d| «      } t        |«      }| j                  |«      \  } }| j                  |«      S )zk
        Add a delta of a timedeltalike

        Returns
        -------
        Same type as self
        ry   rÆ   r=  )rN   rÈ   Úemptyrë   r|   rŽ   r{   Úfillr    rò   r/  r   r   r@  Ú_add_timedeltalike)r€   r¥   Ú
new_valuess      rs   Ú_add_timedeltalike_scalarz0DatetimeLikeArrayMixin._add_timedeltalike_scalar�  sœ   € ô �Œ;äŸ™ $§*¡*°DÔ9×>Ñ>¸t¿}¹}×?RÑ?RÓSˆJØ�O‰OœDÔ!Ü˜“:×)Ñ)¨*¸D¿J¹JÐ)ÓGÐGô Ð4°dÓ;ˆÜ˜%Ó ˆØ×1Ñ1°%Ó8‰ˆˆeØ×&Ñ& uÓ-Ð-ru   c                ó¤   — t        | «      t        |«      k7  rt        d«      ‚t        d| «      j                  |«      \  } }| j	                  |«      S )zl
        Add a delta of a TimedeltaIndex

        Returns
        -------
        Same type as self
        r“  r=  )r¹   rÇ   r   r@  r«  r¤   s     rs   Ú_add_timedelta_arraylikez/DatetimeLikeArrayMixin._add_timedelta_arraylike•  sT   € ô ˆt‹9œ˜E›
Ò"ÜÐCÓDÐDäØ,¨dó
ç
 Ñ
  Ó
'ñ 	ˆˆeð ×&Ñ& uÓ-Ð-ru   c                ó  — | j                  |«      \  }}t        | j                  t        j                  |d¬«      «      }|j                  | j                  j                  «      }t        | «      j                  || j                  ¬«      S )Nry   rÆ   )
r|  r   rº   rÈ   rô   r|   rŽ   r{   rò   r/  )r€   r¥   rˆ  ri  r¬  r‰  s         rs   r«  z)DatetimeLikeArrayMixin._add_timedeltalike§  sh   € à×7Ñ7¸Ó>Ñˆ�&Ü% d§i¡i´·±¸HÈDÔ1QÓRˆ
Ø—_‘_ T§]¡]×%8Ñ%8Ó9ˆ
ä�D‹z×%Ñ% j¸¿
¹
Ð%ÓCÐCru   c                óÊ  — t        | j                  t        «      r;t        dt	        | «      j
                  › dt	        t        «      j
                  › �«      ‚t        j                  | j                  t        j                  ¬«      }|j                  t        «       |j                  | j                  j                  «      }t	        | «      j                  || j                  ¬«      S )z$
        Add pd.NaT to self
        zCannot add r  rÆ   )rz   r{   rJ   rñ   rò   ró   r   rÈ   r©  rë   rð   rª  r    r|   rŽ   r/  ©r€   r„   s     rs   Ú_add_natzDatetimeLikeArrayMixin._add_nat¯  s¡   € ô
 �d—j‘j¤+Ô.ÜØœd 4›j×1Ñ1Ð2°%¼¼S»	×8JÑ8JÐ7KÐLóð ô —‘˜$Ÿ*™*¬B¯H©HÔ5ˆØ�‰”DÔØ—‘˜TŸ]™]×0Ñ0Ó1ˆÜ�D‹z×%Ñ% f°D·J±JÐ%Ó?Ð?ru   c                ó2  — t        j                  | j                  t         j                  ¬«      }|j	                  t
        «       | j                  j                  dv r+t        d| «      } |j                  d| j                  › d�«      S |j                  d«      S )z+
        Subtract pd.NaT from self
        rÆ   rå   zDatetimeArray| TimedeltaArrayr™  r‚  ztimedelta64[ns])rÈ   r©  rë   rð   rª  r    r{   rç   r   r|   r  r²  s     rs   Ú_sub_natzDatetimeLikeArrayMixin._sub_natÀ  sq   € ô —‘˜$Ÿ*™*¬B¯H©HÔ5ˆØ�‰”DÔØ�:‰:�?‰?˜dÑ"äÐ7¸Ó>ˆDØ—;‘; ¨d¯i©i¨[¸Ð:Ó;Ð;à—;‘;Ð0Ó1Ð1ru   c                ó¬  — t        | j                  t        «      s7t        dt	        |«      j
                  › dt	        | «      j
                  › �«      ‚t        d| «      } | j                  |«       | j                  |«      \  }}t        | j                  t        j                  | d¬«      d¬«      }|j                  «       j                  «       }t        j                  |D �cg c]  }| j                   j"                  |z  ‘Œ c}t$        ¬«      j'                  |j(                  «      }|€| j*                  }n| j*                  |z  }t,        ||<   |S c c}w )Núcannot subtract ú from rl   ry   rÆ   T)Úsentinel_ok)rz   r{   rJ   rñ   rò   ró   r   r¦   r|  r   rº   rÈ   rô   ré   Útolistr]   r—   ÚbaserÊ   rê   rë   rB  r   )	r€   r¥   rˆ  ri  Únew_i8_dataÚcountsÚcountÚnew_datarj  s	            rs   Ú_sub_periodlikez&DatetimeLikeArrayMixin._sub_periodlikeÔ  s&  € ô ˜$Ÿ*™*¤kÔ2ÜØ"¤4¨£;×#7Ñ#7Ð"8¸¼tÀD»z×?RÑ?RÐ>SÐTóð ô �M 4Ó(ˆØ×#Ñ# EÔ*à×7Ñ7¸Ó>Ñˆ�&ô 'Ø�I‰I”r—z‘z 8 )°4Ô8Àdô
ˆð
 ×"Ñ"Ó$×+Ñ+Ó-ˆô —8‘8Ø17Ö8¨ˆT�Y‰Y�^‰^˜eÓ#Ò8Äô
ç
‰'�+×#Ñ#Ó
$ð 	ð ˆ>à—;‘;‰Dð —;‘; Ñ'ˆDÜˆ�‰Øˆùò 9s   Ã" Ec                óð  — |t         j                  t         j                  fv sJ ‚t        |«      dk(  r| j                  dk(  r || |d   «      S t
        d   d   r;t        j                  dt        | «      j                  › d�t        t        «       ¬«       | j                  |j                  k(  sJ | j                  |j                  f«       ‚ || j                  d«      t        j                  |«      «      }|S )	aZ  
        Add or subtract array-like of DateOffset objects

        Parameters
        ----------
        other : np.ndarray[object]
        op : {operator.add, operator.sub}

        Returns
        -------
        np.ndarray[object]
            Except in fastpath case with length 1 where we operate on the
            contained scalar.
        r°   r   ÚmodeÚperformance_warningsz)Adding/subtracting object-dtype array to z not vectorized.r  ÚO)rc  ÚaddÚsubr¹   r·   Úconfigr  r   rò   ró   r<   r>   rë   rï   rÈ   rô   )r€   r¥   rr   r‰  s       rs   Ú_addsub_object_arrayz+DatetimeLikeArrayMixin._addsub_object_arrayø  sÒ   € ð  ”h—l‘l¤H§L¡LÐ1Ñ1Ð1Ð1Üˆu‹:˜Š?˜tŸy™y¨Aš~ñ �d˜E !™HÓ%Ð%ä�&‰>Ð0Ò1Ü�M‰MØ;Ü˜“:×&Ñ&Ð'Ð'7ð9ä"Ü+Ó-õ	ð �z‰z˜UŸ[™[Ò(ÐC¨4¯:©:°u·{±{Ð*CÓCÐ(á˜Ÿ™ CÓ(¬"¯*©*°UÓ*;Ó<ˆ
ØÐru   )Úskipnac               óÜ   — |dvrt        d|› dt        | «      › �«      ‚t        t        |«      } || j	                  «       fd|i|¤Ž}t        | «      j                  || j                  ¬«      S )N>   ÚcummaxÚcumminzAccumulation z not supported for rÉ  rÆ   )rñ   rò   r  rV   r˜   r/  r{   )r€   ÚnamerÉ  r‚   rr   r„   s         rs   Ú_accumulatez"DatetimeLikeArrayMixin._accumulate  sm   € ØÐ+Ñ+Ü˜m¨D¨6Ð1DÄTÈ$ÃZÀLÐQÓRÐRäÔ/°Ó6ˆÙ�D—I‘I“KÑ9¨Ð9°&Ñ9ˆä�D‹z×%Ñ% f°D·J±JÐ%Ó?Ð?ru   Ú__add__c                ó  — t        |dd «      }t        |«      }|t        u r| j                  «       }�nút	        |t
        t        t        j                  f«      r| j                  |«      }�nÂt	        |t        «      rXt        j                  | j                  d«      r8t        |j                  ¬«      j!                  d«      }| j                  |«      }�nZt	        |t"        «      r| j%                  |«      }�n7t	        |t&        t        j(                  f«      r| j+                  |«      }�nt	        |t,        «      r3t        j                  | j                  d«      r| j/                  |«      }�nÁt        j0                  |«      rjt	        | j                  t2        «      st5        | «      ‚t7        d| «      }|j9                  ||j                  j:                  z  t<        j>                  «      }�nBt        j                  |d«      r| jA                  |«      }�ntC        |«      r!| jE                  |t<        j>                  «      }nít        j                  |d«      st	        |tF        «      r| jI                  |«      S tK        |«      rit	        | j                  t2        «      st5        | «      ‚t7        d| «      }|j9                  ||j                  j:                  z  t<        j>                  «      }nB|�:|jL                  dk(  r+t	        | j                  t2        «      rtN        S t5        | «      ‚tN        S t	        |t        jP                  «      rDt        j                  |j                  d«      r$d	d
l)m*}  |jV                  ||j                  ¬«      S |S )Nr{   ÚMm©ÚdaysÚsrâ   rl   rÝ   Úbr   r–  rÆ   ),r  r^   r   r³  rz   r   r   rÈ   Útimedelta64r­  r   r   r„  r{   r   r³   r  r   r¦  r   Ú
datetime64rŠ  r   r£  Ú
is_integerrJ   r(   r   Ú_addsub_int_array_or_scalarÚ_nrc  rÅ  r¯  rC   rÈ  rH   rŒ  rA   rç   ra  r!  r…  rm   rî   ©r€   r¥   Úother_dtyper„   ÚtdÚobjrm   s          rs   rÏ  zDatetimeLikeArrayMixin.__add__&  sŒ  € ä˜e W¨dÓ3ˆÜ.¨uÓ5ˆð ”C‰<Ø:>¿-¹-»/ŠFÜ˜¤¤i´·±Ð@ÔAØ×3Ñ3°EÓ:ŠFÜ˜œsÔ#¬¯©¸¿
¹
ÀDÔ(Iä §¡Ô(×0Ñ0°Ó5ˆBØ×3Ñ3°BÓ7ŠFÜ˜œzÔ*à×%Ñ% eÓ,ŠFÜ˜¤¬"¯-©-Ð8Ô9Ø×2Ñ2°5Ó9ŠFÜ˜œvÔ&¬3¯?©?¸4¿:¹:ÀsÔ+KØ×%Ñ% eÓ,ŠFÜ�^‰^˜EÔ"ô ˜dŸj™j¬+Ô6Ü.¨tÓ4Ð4Ü�} dÓ+ˆCØ×4Ñ4°U¸S¿Y¹Y¿\¹\Ñ5IÌ8Ï<É<ÓXŠFô �_‰_˜[¨#Ô.à×2Ñ2°5Ó9ŠFÜ˜[Ô)à×.Ñ.¨u´h·l±lÓC‰FÜ�_‰_˜[¨#Ô.´*Øœô3
ð ×/Ñ/°Ó6Ð6Ü˜kÔ*Ü˜dŸj™j¬+Ô6Ü.¨tÓ4Ð4Ü�} dÓ+ˆCØ×4Ñ4°U¸S¿Y¹Y¿\¹\Ñ5IÌ8Ï<É<ÓX‰FØÐ$¨×)9Ñ)9¸SÒ)@ô ˜$Ÿ*™*¤kÔ2Ü%Ð%Ü*¨4Ó0Ð0ô "Ð!ä�fœbŸj™jÔ)¬c¯o©o¸f¿l¹lÈCÔ.PÝ9à0�>×0Ñ0°¸v¿|¹|ÔLÐLØˆru   c                ó$   — | j                  |«      S rp   )rÏ  r¤   s     rs   Ú__radd__zDatetimeLikeArrayMixin.__radd__i  s   € à�|‰|˜EÓ"Ð"ru   Ú__sub__c                ó*  — t        |dd «      }t        |«      }|t        u r| j                  «       }�nt	        |t
        t        t        j                  f«      r| j                  | «      }�nÉt	        |t        «      rYt        j                  | j                  d«      r9t        |j                  ¬«      j!                  d«      }| j                  | «      }�n`t	        |t"        «      r| j%                  | «      }�n<t	        |t&        t        j(                  f«      r| j+                  |«      }�n	t        j,                  |«      rjt	        | j                  t.        «      st1        | «      ‚t3        d| «      }|j5                  ||j                  j6                  z  t8        j:                  «      }�nŠt	        |t<        «      r| j?                  |«      }�ngt        j                  |d«      r| jA                  | «      }�n=tC        |«      r"| jE                  |t8        j:                  «      }�nt        j                  |d«      st	        |tF        «      r| jI                  |«      }nØt	        |t.        «      r| j?                  |«      }n¶tK        |«      rit	        | j                  t.        «      st1        | «      ‚t3        d| «      }|j5                  ||j                  j6                  z  t8        j:                  «      }nB|�:|jL                  dk(  r+t	        | j                  t.        «      rtN        S t1        | «      ‚tN        S t	        |t        jP                  «      rDt        j                  |j                  d«      r$d	d
l)m*}  |jV                  ||j                  ¬«      S |S )Nr{   rÑ  rÒ  rÔ  rl   râ   rÝ   rÕ  r   r–  rÆ   ),r  r^   r   rµ  rz   r   r   rÈ   rÖ  r­  r   r   r„  r{   r   r³   r  r   r¦  r   r×  r‘  rØ  rJ   r(   r   rÙ  rÚ  rc  rÆ  r   rÀ  r¯  rC   rÈ  rH   r”  rA   rç   ra  r!  r…  rm   rî   rÛ  s          rs   rá  zDatetimeLikeArrayMixin.__sub__m  sš  € ä˜e W¨dÓ3ˆÜ.¨uÓ5ˆð ”C‰<Ø:>¿-¹-»/ŠFÜ˜¤¤i´·±Ð@ÔAØ×3Ñ3°U°FÓ;ŠFÜ˜œsÔ#¬¯©¸¿
¹
ÀDÔ(Iä §¡Ô(×0Ñ0°Ó5ˆBØ×3Ñ3°R°CÓ8ŠFÜ˜œzÔ*à×%Ñ% u fÓ-ŠFÜ˜¤¬"¯-©-Ð8Ô9Ø×2Ñ2°5Ó9ŠFÜ�^‰^˜EÔ"ô ˜dŸj™j¬+Ô6Ü.¨tÓ4Ð4Ü�} dÓ+ˆCØ×4Ñ4°U¸S¿Y¹Y¿\¹\Ñ5IÌ8Ï<É<ÓXŠFä˜œvÔ&Ø×)Ñ)¨%Ó0ŠFô �_‰_˜[¨#Ô.à×2Ñ2°E°6Ó:ŠFÜ˜[Ô)à×.Ñ.¨u´h·l±lÓCŠFÜ�_‰_˜[¨#Ô.´*Øœô3
ð ×1Ñ1°%Ó8‰FÜ˜¤[Ô1à×)Ñ)¨%Ó0‰FÜ˜kÔ*Ü˜dŸj™j¬+Ô6Ü.¨tÓ4Ð4Ü�} dÓ+ˆCØ×4Ñ4°U¸S¿Y¹Y¿\¹\Ñ5IÌ8Ï<É<ÓX‰FØÐ$¨×)9Ñ)9¸SÒ)@ä˜$Ÿ*™*¤kÔ2Ü%Ð%Ü*¨4Ó0Ð0ô "Ð!ä�fœbŸj™jÔ)¬c¯o©o¸f¿l¹lÈCÔ.PÝ9à0�>×0Ñ0°¸v¿|¹|ÔLÐLØˆru   c           	     ó  — t        |dd «      }t        j                  |d«      xs t        |t        «      }|r|t        j                  | j
                  d«      r\t        j                  |«      rt        |«      | z
  S t        |t        «      s$ddl	m
}  |j                  ||j
                  ¬«      }|| z
  S | j
                  j                  dk(  rSt        |d«      rG|sEt        dt        | «      j                   › dt        |«      j                   › d	|j
                  › d
�«      ‚t        | j
                  t"        «      rDt        j                  |d«      r.t        dt        | «      j                   › d|j
                  › �«      ‚t        j                  | j
                  d«      rt%        d| «      } |  |z   S | |z
  }|j
                  j                  dk(  r7t        dt        | «      j                   › dt        |«      j                   › �«      ‚| S )Nr{   rÝ   râ   r   r€  rÆ   r·  r¸  ú[r‚  rm   )r  r   r„  rz   rH   r{   rØ   r   rŠ   r…  rk   rî   rç   r  rñ   rò   ró   rJ   r   )r€   r¥   rÜ  Úother_is_dt64rk   Úflippeds         rs   Ú__rsub__zDatetimeLikeArrayMixin.__rsub__®  s¼  € Ü˜e W¨dÓ3ˆÜŸ™¨°SÓ9ò 
¼ZØœó>
ˆñ œSŸ_™_¨T¯Z©Z¸Ô=ô �}‰}˜UÔ#ä  Ó'¨$Ñ.Ð.Ü˜eÔ%;Ô<å<à4˜×4Ñ4°UÀ%Ç+Á+ÔN�Ø˜4‘<ÐØ�Z‰Z�_‰_ Ò#¬°°wÔ(?Éô Ø"¤4¨£:×#6Ñ#6Ð"7°vÜ˜“;×'Ñ'Ð(¨¨%¯+©+¨°að9óð ô ˜Ÿ
™
¤KÔ0´S·_±_À[ÐRUÔ5VäÐ.¬t°D«z×/BÑ/BÐ.CÀ6È%Ï+É+ÈÐWÓXÐXÜ�_‰_˜TŸZ™Z¨Ô-ÜÐ(¨$Ó/ˆDØ�E˜U‘?Ð"à˜‘,ˆØ�=‰=×Ñ Ò$äØ"¤4¨£:×#6Ñ#6Ð"7°v¼dÀ5»k×>RÑ>RÐ=SÐTóð ð ˆxˆru   c                ó    — | |z   }|d d  | d d  | S rp   r‘   ©r€   r¥   r„   s      rs   Ú__iadd__zDatetimeLikeArrayMixin.__iadd__×  ó   € Ø˜‘ˆØ™�)ˆ‰QˆØˆru   c                ó    — | |z
  }|d d  | d d  | S rp   r‘   ré  s      rs   Ú__isub__zDatetimeLikeArrayMixin.__isub__Ü  rë  ru   c                ó&   •— t         ‰| �  ||¬«      S )N)ÚqsÚinterpolation)r×   Ú	_quantile)r€   rï  rð  rÙ   s      €rs   rñ  z DatetimeLikeArrayMixin._quantileä  s   ø€ ô ‰wÑ  B°mÐ ÓDÐDru   ©ÚaxisrÉ  c               óÖ   — t        j                  d|«       t        j                  || j                  «       t	        j
                  | j                  ||¬«      }| j                  ||«      S )a  
        Return the minimum value of the Array or minimum along
        an axis.

        See Also
        --------
        numpy.ndarray.min
        Index.min : Return the minimum value in an Index.
        Series.min : Return the minimum value in a Series.
        r‘   rò  )ÚnvÚvalidate_minÚvalidate_minmax_axisr·   rQ   ÚnanminrŽ   Ú_wrap_reduction_result©r€   ró  rÉ  r‚   r„   s        rs   ÚminzDatetimeLikeArrayMixin.minì  óO   € ô 	�‰˜˜FÔ#Ü
×Ñ  d§i¡iÔ0ä—‘˜tŸ}™}°4ÀÔGˆØ×*Ñ*¨4°Ó8Ð8ru   c               óÖ   — t        j                  d|«       t        j                  || j                  «       t	        j
                  | j                  ||¬«      }| j                  ||«      S )a  
        Return the maximum value of the Array or maximum along
        an axis.

        See Also
        --------
        numpy.ndarray.max
        Index.max : Return the maximum value in an Index.
        Series.max : Return the maximum value in a Series.
        r‘   rò  )rõ  Úvalidate_maxr÷  r·   rQ   ÚnanmaxrŽ   rù  rú  s        rs   ÚmaxzDatetimeLikeArrayMixin.maxþ  rü  ru   r   )rÉ  ró  c               ó   — t        | j                  t        «      r"t        dt	        | «      j
                  › d�«      ‚t        j                  | j                  ||| j                  «       ¬«      }| j                  ||«      S )a  
        Return the mean value of the Array.

        Parameters
        ----------
        skipna : bool, default True
            Whether to ignore any NaT elements.
        axis : int, optional, default 0
            Axis for the function to be applied on.

        Returns
        -------
        scalar
            Timestamp or Timedelta.

        See Also
        --------
        numpy.ndarray.mean : Returns the average of array elements along a given axis.
        Series.mean : Return the mean value in a Series.

        Notes
        -----
        mean is only defined for Datetime and Timedelta dtypes, not for Period.

        Examples
        --------
        For :class:`pandas.DatetimeIndex`:

        >>> idx = pd.date_range("2001-01-01 00:00", periods=3)
        >>> idx
        DatetimeIndex(['2001-01-01', '2001-01-02', '2001-01-03'],
                      dtype='datetime64[us]', freq='D')
        >>> idx.mean()
        Timestamp('2001-01-02 00:00:00')

        For :class:`pandas.TimedeltaIndex`:

        >>> tdelta_idx = pd.to_timedelta([1, 2, 3], unit="D")
        >>> tdelta_idx
        TimedeltaIndex(['1 days', '2 days', '3 days'],
                        dtype='timedelta64[us]', freq=None)
        >>> tdelta_idx.mean()
        Timedelta('2 days 00:00:00')
        zmean is not implemented for zX since the meaning is ambiguous.  An alternative is obj.to_timestamp(how='start').mean()©ró  rÉ  rj  )rz   r{   rJ   rñ   rò   ró   rQ   ÚnanmeanrŽ   rN   rù  )r€   rÉ  ró  r„   s       rs   ÚmeanzDatetimeLikeArrayMixin.mean  su   € ôZ �d—j‘j¤+Ô.äØ.¬t°D«z×/BÑ/BÐ.Cð D7ð 7óð ô —‘Ø�M‰M ¨V¸$¿)¹)»+ô
ˆð ×*Ñ*¨4°Ó8Ð8ru   c               óà   — t        j                  d|«       |�#t        |«      | j                  k\  rt	        d«      ‚t        j                  | j                  ||¬«      }| j                  ||«      S )Nr‘   z abs(axis) must be less than ndimrò  )	rõ  Úvalidate_medianÚabsr·   rÇ   rQ   Ú	nanmedianrŽ   rù  rú  s        rs   ÚmedianzDatetimeLikeArrayMixin.medianJ  s^   € ä
×Ñ˜2˜vÔ&àÐ¤ D£	¨T¯Y©YÒ 6ÜÐ?Ó@Ð@ä×!Ñ! $§-¡-°dÀ6ÔJˆØ×*Ñ*¨4°Ó8Ð8ru   c                ó   — d }|r| j                  «       }t        j                  | j                  d«      |¬«      \  }}|j                  | j                  j
                  «      }t        d|«      }| j                  |«      S )Nry   )rj  r�   )rN   rO   rÂ  r|   rŽ   r{   r   r   )r€   Údropnarj  Úi8modesÚ_Únpmodess         rs   Ú_modezDatetimeLikeArrayMixin._modeT  sf   € ØˆÙØ—9‘9“;ˆDä—_‘_ T§Y¡Y¨t£_¸4Ô@‰
ˆ�Ø—,‘,˜tŸ}™}×2Ñ2Ó3ˆÜ�| WÓ-ˆØ×&Ñ& wÓ/Ð/ru   c               óv  — | j                   }|j                  dk(  r5|dv rt        d|› d�«      ‚|dv rjt        t        j                  |«      «      ‚t        |t        «      r)|dv rt        d|› d�«      ‚|dv r%t        d|› d|› d	�«      ‚|d
v rt        d|› d�«      ‚| j                  j                  d«      }ddl	m
}	  |	||¬«      }
 |
j                  |f|||d dœ|¤Ž}|
j                  |
j                  v r|S |j                   dk(  sJ ‚|dv rvddlm} t        | j                   t        «      rt        d«      ‚t!        d| «      } d| j"                  › d�}|j                  |«      } |j$                  ||j                   ¬«      S |j                  | j                  j                   «      }| j'                  |«      S )NrÝ   )ÚsumÚprodÚcumsumÚcumprodÚvarÚskewÚkurtz,datetime64 type does not support operation 'r  )rE  ÚallzPeriod type does not support z operationszX' with PeriodDtype is no longer supported. Use (obj != pd.Period(ordinal=0, freq=freq)).z() instead.)r  r  r  r  r  z"timedelta64 type does not support rx   r   )ÚWrappedCythonOp)ÚhowÚhas_dropped_na)Ú	min_countÚngroupsÚcomp_idsrj  )ÚstdÚsemr–  z-'std' and 'sem' are not valid for PeriodDtyper=  zm8[r‚  rÆ   )r{   rç   rñ   rQ   Údt64_any_all_msgrz   rJ   rŽ   r|   Úpandas.core.groupby.opsr  Ú_cython_op_ndim_compatr  Úcast_blocklistr…  rm   r   r  r/  r   )r€   r  r  r  r  Úidsr‚   r{   Únpvaluesr  rr   r‰  rm   Ú	new_dtypes                 rs   Ú_groupby_opz"DatetimeLikeArrayMixin._groupby_opa  sê  € ð —
‘
ˆØ�:‰:˜ÒàÐQÑQÜÐ"NÈsÈeÐSTÐ UÓVÐVØ�nÑ$ä¤× 7Ñ 7¸Ó <Ó=Ð=ä˜œ{Ô+àÐQÑQÜÐ"?À¸uÀKÐ PÓQÐQØ�nÑ$äØ˜�uð DØDGÀ5ÈðUóð ð
 Ð>Ñ>ÜÐ@ÀÀÀ[ÐQÓRÐRð —=‘=×%Ñ% hÓ/ˆå;á °^ÔDˆà.�R×.Ñ.Øð
àØØØñ
ð ñ
ˆ
ð �6‰6�R×&Ñ&Ñ&ð Ðð ×Ñ 8Ò+Ð+Ð+Ø�.Ñ Ý9ä˜$Ÿ*™*¤kÔ2ÜÐ OÓPÐPÜÐ8¸$Ó?ˆDØ˜dŸi™i˜[¨Ð*ˆIØ#Ÿ™¨Ó3ˆJØ-�>×-Ñ-¨jÀ
×@PÑ@PÔQÐQà—_‘_ T§]¡]×%8Ñ%8Ó9ˆ
Ø×&Ñ& zÓ2Ð2ru   c               óÔ  — t        |«      }| j                  «       }| j                  }	d}
| j                  dk(  r| j                  j
                  d   }
t        j                  |
||ft        j                  ¬«      }t        |
«      D ]B  }| j                  dk(  r||   }|	|   }n|}|	}t        j                  ||   |||||||d d¬«
       ŒD | j                  dk(  r|j                  d«      }n|j                  |
||z  «      }t        j                  |«      }d||<   |j                  d«      }t         ||<   |j#                  | j                  j$                  «      }| j'                  |«      S )	Nr°   é   r   rÆ   T)	r­   rj  Úlabelsrï  rð  ÚstartsÚendsÚresult_maskr+  r[  ry   )r¹   rN   rº   r·   rŽ   rë   rÈ   r©  Úfloat64r¸   Ú
libgroupbyÚgroup_quantileré   rê   Úisnanrï   r    r|   r{   r   )r€   rï  rð  r%  r  r,  r-  Únqsrj  r¡  ÚncolsÚoutÚcolÚcol_maskÚcol_valsÚna_masks                   rs   Ú_groupby_quantilez(DatetimeLikeArrayMixin._groupby_quantile§  sR  € ô �"‹gˆØ�y‰y‹{ˆØ—‘ˆð ˆØ�9‰9˜Š>Ø—M‘M×'Ñ'¨Ñ*ˆEä�h‰h˜˜w¨Ð,´B·J±JÔ?ˆÜ˜“<ò 	ˆCØ�y‰y˜AŠ~Ø ™9�Ø! #™;‘à�Ø!�ä×%Ñ%Ø�C‘ØØØØØ+ØØØ Ø $öð	ð* �9‰9˜Š>Ø—)‘)˜C“.‰Cà—+‘+˜e W¨s¡]Ó3ˆCô —(‘(˜3“-ˆØˆˆG‰Ø�j‰j˜ÓˆÜˆˆG‰Ø�h‰h�t—}‘}×*Ñ*Ó+ˆØ×&Ñ& sÓ+Ð+ru   ©Úreturnr?  )NNF)r{   úDtype | Noner˜   r?  r<  ÚNone)r<  ztype[DatetimeLikeScalar])rž   r  r<  rn   )rž   rn   r<  z)np.int64 | np.datetime64 | np.timedelta64)r¥   rn   r<  r>  ©r<  r�   ©r<  zIterator[Any])r<  únpt.NDArray[np.int64])r½   zstr | floatr<  únpt.NDArray[np.object_])F)rÃ   r?  r<  zCallable[[object], str])NN)r{   zNpDtype | Noner˜   zbool | Noner<  r�   )rÑ   r3   r<  rn   )rÑ   z(SequenceIndexer | PositionalIndexerTupler<  r
   )rÑ   r1   r<  rÖ   )rÑ   z,int | Sequence[int] | Sequence[bool] | slicerž   zNaTType | Any | Sequence[Any]r<  r>  ©T)r˜   r?  )r<  r
   )r{   zLiteral['M8[ns]']r<  rk   )r{   zLiteral['m8[ns]']r<  rm   ).)r{   r=  r<  r)   rp   )r  r?  r  r?  )r  r?  r<  r  )r  r?  )r<  z6np.int64 | np.datetime64 | np.timedelta64 | np.ndarrayr�   )r,  ú
int | Noner˜   r?  r<  r
   )r6  zLiteral['ignore'] | None)r­   r)   r<  únpt.NDArray[np.bool_])r<  rE  )r„   r�   r<  r�   )r<  z
str | None)r<  zstr | BaseOffset | None)r<  z@tuple[int | npt.NDArray[np.int64], npt.NDArray[np.bool_] | None])r<  rk   )r¥   rk   r<  rk   )r¥   zdatetime | np.datetime64r<  rm   )r¥   rk   r<  rm   )r¥   zTimestamp | DatetimeArrayr<  rm   )r¥   r   r<  rl   )r¥   rm   r<  r
   )r¥   zTimedelta | TimedeltaArrayr<  r
   )r¥   zPeriod | PeriodArrayr<  rB  )r¥   rB  r<  r�   )rÍ  r  rÉ  r?  r<  r
   )rï  únpt.NDArray[np.float64]rð  r  r<  r
   )ró  úAxisInt | NonerÉ  r?  )rÉ  r?  ró  rG  )r  r?  )
r  r  r  r?  r  Úintr  rH  r%  únpt.NDArray[np.intp])rï  rF  rð  z;Literal['linear', 'lower', 'higher', 'nearest', 'midpoint']r%  rI  r  rH  r,  rA  r-  rA  r<  r)   )]ró   Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__r=   r“   r™   Úpropertyr›   rŸ   r¢   r¦   r}   r®   r»   rº   rÀ   rÄ   rÎ   r   rÒ   rÛ   rï   r|   r  r  r
  r  r(  r   r'  r0  rY   r:  rS   rN   rB  r-  r    rJ  rM  rO  rV  rY  r]  rl  rt   rm  rn  ro  rp  rq  rr  rs  rt  ru  rv  rw  rx  r|  rŠ  rŒ  r‘  r”  r�  r£  r¦  r­  r¯  r«  r³  rµ  rÀ  rÈ  rÎ  ra   rÏ  rà  rá  rç  rê  rí  rˆ   rñ  rû  r   r  r	  r  r(  r:  Ú__classcell__©rÙ   s   @rs   rŠ   rŠ   Á   s½  ø… ñð 5Ó4Ø)Ó)ØÓàòó ðð INð(Ø'ð(ØAEð(à	ó(ð
 ò(ó ð(ó(ð((Ø"ð(à	2ó(ó.(ò,(óDó:ð ò
(ó ð
(ð  (-¸$ñ
(Ø$ð
(à	 ó
(ôð AEðØ#ðØ2=ðà	óð( ÚCó ØCàðà5ðð 
òó ðõ
ð&(à9ð(ð -ð(ð 
õ	(ö"71ðr Úó ØàÚBó ØBàÚCó ØCàÛ?ó Ø?ö#ò%ðV  %Øñ;)ð ð	;)ð
 ó;)ôzô>Tòl"ð ò
ó ð
ö=ð@ ó	 ó ð	 ó3,ópð ò!ó ð!ð ò'ó ð'ð .2¸4ðØ ðà	óð< ò	ó ð	ð ò$
ó ð$
ðR ò?ó ð?ð ò?ó ð?ð ò@ó ð@òDñP (¨	Ó2€GÙ(¨Ó4€HÙ'¨	Ó2€GÙ(¨Ó4€HÙ+¨MÓ:€KÙ,¨^Ó<€LÙ,¨^Ó<€LÙ-¨oÓ>€MÙ'¨	Ó2€GÙ(¨Ó4€HÙ*¨<Ó8€JÙ+¨MÓ:€Kà
ðà	Iòó ðð$ òBó ðBð@ òó ðð ð*Ø-ð*à	ò*ó ð*ð$ ò
-ó ð
-ð òFó ðFð" ò
ó ð
ò(ò.ó(.ð$ òDó ðDð ò@ó ð@ð  ò2ó ð2ð& ò!ó ð!ðF ò"ó ð"ðH 8<õ @ñ ˜iÓ(ñ@ó )ð@òD#ñ ˜iÓ(ñ>ó )ð>ò@'óRó
ð ðEà#ðEð ðEð 
ô	Eó ðEð Ø,0Àô 9ó ð9ð" Ø,0Àô 9ó ð9ð" &*À!õ 89ðt Ø/3ÀDô 9ó ð9ô0ðD3ð ðD3ð ð	D3ð
 ðD3ð ðD3ð "óD3ðL5,ð $ð5,ð Sð	5,ð
 "ð5,ð ð5,ð &ð5,ð $ð5,ð 
÷5,ru   rŠ   c                  ó   — e Zd ZdZdd„Zy)ÚDatelikeOpszK
    Common ops for DatetimeIndex/PeriodIndex, but not TimedeltaIndex.
    c                óÖ   — | j                  |t        j                  ¬«      }t        «       r(ddlm} t        | |t        j                  ¬«      ¬«      S |j                  t        d¬«      S )aÑ  
        Convert to Index using specified date_format.

        Return an Index of formatted strings specified by date_format, which
        supports the same string format as the python standard library. Details
        of the string format can be found in `python string format
        doc <https://docs.python.org/3/library/datetime.html
        #strftime-and-strptime-behavior>`__.

        Formats supported by the C `strftime` API but not by the python string format
        doc (such as `"%R"`, `"%r"`) are not officially supported and should be
        preferably replaced with their supported equivalents (such as `"%H:%M"`,
        `"%I:%M:%S %p"`).

        Note that `PeriodIndex` support additional directives, detailed in
        `Period.strftime`.

        Parameters
        ----------
        date_format : str
            Date format string (e.g. "%%Y-%%m-%%d").

        Returns
        -------
        ndarray[object]
            NumPy ndarray of formatted strings.

        See Also
        --------
        to_datetime : Convert the given argument to datetime.
        DatetimeIndex.normalize : Return DatetimeIndex with times to midnight.
        DatetimeIndex.round : Round the DatetimeIndex to the specified freq.
        DatetimeIndex.floor : Floor the DatetimeIndex to the specified freq.
        Timestamp.strftime : Format a single Timestamp.
        Period.strftime : Format a single Period.

        Examples
        --------
        >>> rng = pd.date_range(pd.Timestamp("2018-03-10 09:00"), periods=3, freq="s")
        >>> rng.strftime("%B %d, %Y, %r")
        Index(['March 10, 2018, 09:00:00 AM', 'March 10, 2018, 09:00:01 AM',
               'March 10, 2018, 09:00:02 AM'],
              dtype='str')
        )r¾   r½   r   )ÚStringDtype©rì   rÆ   Frã   )	rÀ   rÈ   rG  r   r7  rT  r"  rï   rÊ   )r€   r¾   r„   rT  s       rs   ÚstrftimezDatelikeOps.strftimeä  sP   € ðZ ×*Ñ*°{Ì2Ï6É6Ð*ÓRˆÜÔÝ*ä˜F©+¼r¿v¹vÔ*FÔGÐGØ�}‰}œV¨%ˆ}Ó0Ð0ru   N)r¾   r  r<  rB  )ró   rJ  rK  rL  rV  r‘   ru   rs   rR  rR  ß  s   „ ñô21ru   rR  i'  c                  ón  ‡ — e Zd ZdZed„ «       Zdd„Zdd„Zeedd„«       «       Z	e	 	 	 	 dd„«       Z
edd„«       Zedd„«       Zdd d
„Zd„ Zd!ˆ fd„Zd„ Z	 	 d"	 	 	 	 	 d#d„Z	 	 d"	 	 	 	 	 d#d„Z	 	 d"	 	 	 	 	 d#d„Zdd	dœd$d„Zdd	dœd$d„Zd%ˆ fd„Z	 	 d&	 	 	 d'ˆ fd„Z	 	 	 	 	 	 	 	 	 	 d(d„Zed)d„«       Zˆ xZS )*r_  zK
    Common ops for TimedeltaIndex/DatetimeIndex, but not PeriodIndex.
    c                ó   — t        | «      ‚rp   r•   )rø   r­   r{   s      rs   Ú_validate_dtypezTimelikeOps._validate_dtype!  s   € ä! #Ó&Ð&ru   c                ó   — t        | «      ‚rp   r•   )r€   r–   s     rs   Ú_iter_convert_chunkzTimelikeOps._iter_convert_chunk%  r§  ru   c              #  ó@  K  — | j                   dkD  r!t        t        | «      «      D ]	  }| |   –— Œ y | j                  }t        | «      }t        }||z  dz   }t        |«      D ]5  }||z  }t        |dz   |z  |«      }| j                  ||| «      E d {  –—†  Œ7 y 7 Œ­w)Nr°   )r·   r¸   r¹   rŽ   Ú_ITER_CHUNKSIZErû  r[  )r€   Úir–   ÚlengthÚ	chunksizeÚchunksÚstart_iÚend_is           rs   r»   zTimelikeOps.__iter__(  s®   è ø€ Ø�9‰9�qŠ=Üœ3˜t›9Ó%ò �Ø˜1‘g“ñð —=‘=ˆDÜ˜“YˆFÜ'ˆIØ 	Ñ)¨QÑ.ˆFÜ˜6“]ò I�Ø˜i™-�Ü˜Q ™U iÑ/°Ó8�Ø×3Ñ3°D¸ÀÐ4GÓH×HÑHñIð Iús   ‚BBÂBÂBc                óü  — |j                   }|j                  dk(  s||j                  k(  ryt        |j                  dd«      �!t        |t        «      s|j                  d«      }	 | j                  |d   dt        |«      ||j                  ¬«      }t        j                  |j                  |j                  «      st        ‚y# t        $ r0}dt        |«      v r|‚t        d|› d|j                  › �«      |‚d}~ww xY w)am  
        Validate that a frequency is compatible with the values of a given
        Datetime Array/Index or Timedelta Array/Index

        Parameters
        ----------
        index : DatetimeIndex or TimedeltaIndex
            The index on which to determine if the given frequency is valid
        freq : DateOffset
            The frequency to validate
        r   Nrß   )ÚstartÚendÚperiodsr—   r  z	non-fixedzInferred frequency z9 from passed values does not conform to passed frequency )rM  r\  Úfreqstrr  r{   rz   r   Útz_localizeÚ_generate_ranger¹   r  r   Úarray_equivalent_bytesrº   rÇ   r  )rø   Úindexr—   ÚinferredÚon_freqr  s         rs   Ú_validate_frequencyzTimelikeOps._validate_frequency7  s  € ð ×+Ñ+ˆØ�:‰:˜Š?˜h¨$¯,©,Ò6Øä�5—;‘;  dÓ+Ð7Ä
È4ÔQUÔ@Vð ×%Ñ% dÓ+ˆEð	Ø×)Ñ)Ø˜A‘hØÜ˜E›
ØØ—Z‘Zð *ó ˆGô ×-Ñ-¨e¯j©j¸'¿,¹,ÔGÜ Ð ð Høäò 	Øœc #›hÑ&ð �	ô Ø% h Zð 08Ø8<¿¹°~ðGóð ðûð	ús   Á%AC Ã	C;Ã+C6Ã6C;c                ó   — t        | «      ‚rp   r•   )rø   re  rf  rg  r—   r�   r‚   s          rs   rj  zTimelikeOps._generate_rangeg  s   € ô " #Ó&Ð&ru   c                ó@   — t        | j                  j                  «      S rp   )r   rŽ   r{   r’   s    rs   rè   zTimelikeOps._cresoo  s   € ä" 4§=¡=×#6Ñ#6Ó7Ð7ru   c                ó,   — t        | j                  «      S )a4  
        The precision unit of the datetime data.

        Returns the precision unit for the dtype.
        It means the smallest time frame that can be stored within this dtype.

        Returns
        -------
        str
            Unit string representation (e.g. "ns").

        See Also
        --------
        TimelikeOps.as_unit : Converts to a specific unit.

        Examples
        --------
        >>> idx = pd.DatetimeIndex(["2020-01-02 01:02:03.004005006"])
        >>> idx.unit
        'ns'
        >>> idx.as_unit("s").unit
        's'
        )Údtype_to_unitr{   r’   s    rs   r  zTimelikeOps.units  s   € ô6 ˜TŸZ™ZÓ(Ð(ru   Tc                óŽ  — |dvrt        d«      ‚t        j                  | j                  j                  › d|› d�«      }t	        | j
                  ||¬«      }t        | j                  t        j                  «      r|j                  }n#t        d| «      j                  }t        ||¬«      }t        | «      j                  ||¬«      S )	aZ  
        Convert to a dtype with the given unit resolution.

        The limits of timestamp representation depend on the chosen resolution.
        Different resolutions can be converted to each other through as_unit.

        Parameters
        ----------
        unit : {'s', 'ms', 'us', 'ns'}
        round_ok : bool, default True
            If False and the conversion requires rounding, raise ValueError.

        Returns
        -------
        same type as self
            Converted to the specified unit.

        See Also
        --------
        Timestamp.as_unit : Convert to the given unit.

        Examples
        --------
        For :class:`pandas.DatetimeIndex`:

        >>> idx = pd.DatetimeIndex(["2020-01-02 01:02:03.004005006"])
        >>> idx
        DatetimeIndex(['2020-01-02 01:02:03.004005006'],
                      dtype='datetime64[ns]', freq=None)
        >>> idx.as_unit("s")
        DatetimeIndex(['2020-01-02 01:02:03'], dtype='datetime64[s]', freq=None)

        For :class:`pandas.TimedeltaIndex`:

        >>> tdelta_idx = pd.to_timedelta(["1 day 3 min 2 us 42 ns"])
        >>> tdelta_idx
        TimedeltaIndex(['1 days 00:03:00.000002042'],
                        dtype='timedelta64[ns]', freq=None)
        >>> tdelta_idx.as_unit("s")
        TimedeltaIndex(['1 days 00:03:00'], dtype='timedelta64[s]', freq=None)
        )rÔ  ÚmsÚusÚnsz)Supported units are 's', 'ms', 'us', 'ns'z8[r‚  r  rk   rƒ  rÆ   )rÇ   rÈ   r{   rç   r   rŽ   rz   r   rß   rH   rò   r/  )r€   r  r  r{   r¬  r'  rß   s          rs   r  zTimelikeOps.as_unit�  s­   € ðT Ð.Ñ.ÜÐHÓIÐIä—‘˜DŸJ™JŸO™OÐ,¨B¨t¨f°AÐ6Ó7ˆÜ(¨¯©¸ÈÔQˆ
ä�d—j‘j¤"§(¡(Ô+Ø"×(Ñ(‰Iä�o tÓ,×/Ñ/ˆBÜ'¨2°DÔ9ˆIä�D‹z×%Ñ%ØØð &ó 
ð 	
ru   c                óâ   — | j                   |j                   k7  rS| j                   |j                   k  r| j                  |j                  «      } | |fS |j                  | j                  «      }| |fS rp   )rè   r  r  r¤   s     rs   r@  z"TimelikeOps._ensure_matching_resosÍ  s^   € Ø�;‰;˜%Ÿ,™,Ò&à�{‰{˜UŸ\™\Ò)Ø—|‘| E§J¡JÓ/�ð �Uˆ{Ðð Ÿ™ d§i¡iÓ0�Ø�Uˆ{Ðru   c                óò   •— |t         j                  t         j                  t         j                  fv r2t	        |«      dk(  r$|d   | u r t        ||«      | j                  fi |¤ŽS t        ‰| �   ||g|¢­i |¤ŽS )Nr°   r   )	rÈ   r2  ÚisinfÚisfiniter¹   r  rŽ   r×   Ú__array_ufunc__)r€   ÚufuncÚmethodÚinputsr‚   rÙ   s        €rs   r|  zTimelikeOps.__array_ufunc__Ø  sq   ø€ à”b—h‘h¤§¡¬"¯+©+Ð6Ñ6Ü�F“˜qÒ Ø�q‘	˜TÑ!ð *”7˜5 &Ó)¨$¯-©-ÑB¸6ÑBÐBä‰wÑ& u¨fÐH°vÒHÀÑHÐHru   c                ó0  — t        | j                  t        «      rOt        d| «      } | j	                  d «      }|j                  ||||«      }|j	                  | j                  ||¬«      S | j                  d«      }t        d|«      }t        || j                  «      }|dk(  r| j                  «       S t        |||«      }	| j                  |	t        ¬«      }|j                  | j                  j                  «      }| j                  || j                  ¬«      S )Nrk   )Ú	ambiguousÚnonexistentry   r�   r   )rI  rÆ   )rz   r{   rH   r   ri  Ú_roundrß   r|   r'   rè   r˜   r%   rJ  r    rŽ   r/  )
r€   r—   rÂ  r�  r‚  Únaiver„   r­   ÚnanosÚ	result_i8s
             rs   rƒ  zTimelikeOps._roundã  sö   € ä�d—j‘j¤/Ô2ä˜¨Ó.ˆDØ×$Ñ$ TÓ*ˆEØ—\‘\ $¨¨i¸ÓEˆFØ×%Ñ%Ø—‘ 9¸+ð &ó ð ð —‘˜4“ˆÜ�l FÓ+ˆÜ" 4¨¯©Ó5ˆØ�AŠ:à—9‘9“;ÐÜ! &¨$°Ó6ˆ	Ø×)Ñ)¨)ÄÐ)ÓEˆØ—‘˜TŸ]™]×0Ñ0Ó1ˆØ×Ñ ¨d¯j©jÐÓ9Ð9ru   c                óF   — | j                  |t        j                  ||«      S )aÅ  
        Perform round operation on the data to the specified `freq`.

        This method rounds each datetime value in the Series/Index to the
        nearest specified frequency using standard rounding rules (round half
        to even).

        Parameters
        ----------
        freq : str or Offset
            The frequency level to round the index to. Must be a fixed
            frequency like 's' (second) not 'ME' (month end). See
            :ref:`frequency aliases <timeseries.offset_aliases>` for
            a list of possible `freq` values.
        ambiguous : 'infer', bool-ndarray, 'NaT', default 'raise'
            Only relevant for DatetimeIndex:

            - 'infer' will attempt to infer fall dst-transition hours based on
              order. Requires that the timestamps are monotonically increasing.
            - bool-ndarray where True signifies a DST time, False designates
              a non-DST time (note that this flag is only applicable for
              ambiguous times)
            - 'NaT' will return NaT where there are ambiguous times
            - 'raise' will raise a ValueError if there are ambiguous
              times.

        nonexistent : 'shift_forward', 'shift_backward', 'NaT', timedelta,             default 'raise'
            A nonexistent time does not exist in a particular timezone
            where clocks moved forward due to DST.

            - 'shift_forward' will shift the nonexistent time forward to the
              closest existing time
            - 'shift_backward' will shift the nonexistent time backward to the
              closest existing time
            - 'NaT' will return NaT where there are nonexistent times
            - timedelta objects will shift nonexistent times by the timedelta
            - 'raise' will raise a ValueError if there are
              nonexistent times.

        Returns
        -------
        DatetimeIndex, TimedeltaIndex, or Series
            Index of the same type for a DatetimeIndex or TimedeltaIndex,
            or a Series with the same index for a Series.

        Raises
        ------
        ValueError if the `freq` cannot be converted.

        See Also
        --------
        DatetimeIndex.floor :
            Perform floor operation on the data to the specified `freq`.
        DatetimeIndex.snap :
            Snap time stamps to nearest occurring frequency.

        Notes
        -----
        If the timestamps have a timezone, rounding will take place relative to the
        local ("wall") time and re-localized to the same timezone. When rounding
        near daylight savings time, use ``nonexistent`` and ``ambiguous`` to
        control the re-localization behavior.

        Examples
        --------
        **DatetimeIndex**

        >>> rng = pd.date_range("1/1/2018 11:59:00", periods=3, freq="min")
        >>> rng
        DatetimeIndex(['2018-01-01 11:59:00', '2018-01-01 12:00:00',
                       '2018-01-01 12:01:00'],
                      dtype='datetime64[us]', freq='min')

        >>> rng.round('h')
        DatetimeIndex(['2018-01-01 12:00:00', '2018-01-01 12:00:00',
                       '2018-01-01 12:00:00'],
                      dtype='datetime64[us]', freq=None)

        **Series**

        >>> pd.Series(rng).dt.round("h")
        0   2018-01-01 12:00:00
        1   2018-01-01 12:00:00
        2   2018-01-01 12:00:00
        dtype: datetime64[us]

        When rounding near a daylight savings time transition, use ``ambiguous`` or
        ``nonexistent`` to control how the timestamp should be re-localized.

        >>> rng_tz = pd.DatetimeIndex(["2021-10-31 03:30:00"], tz="Europe/Amsterdam")

        >>> rng_tz.floor("2h", ambiguous=False)
        DatetimeIndex(['2021-10-31 02:00:00+01:00'],
                      dtype='datetime64[us, Europe/Amsterdam]', freq=None)

        >>> rng_tz.floor("2h", ambiguous=True)
        DatetimeIndex(['2021-10-31 02:00:00+02:00'],
                      dtype='datetime64[us, Europe/Amsterdam]', freq=None)
        )rƒ  r$   ÚNEAREST_HALF_EVEN©r€   r—   r�  r‚  s       rs   ÚroundzTimelikeOps.roundù  s    € ðT �{‰{˜4¤×!:Ñ!:¸IÀ{ÓSÐSru   c                óF   — | j                  |t        j                  ||«      S )a¨  
        Perform floor operation on the data to the specified `freq`.

        This method rounds each datetime value in the Series/Index down to
        the specified frequency (i.e., towards negative infinity).

        Parameters
        ----------
        freq : str or Offset
            The frequency level to floor the index to. Must be a fixed
            frequency like 's' (second) not 'ME' (month end). See
            :ref:`frequency aliases <timeseries.offset_aliases>` for
            a list of possible `freq` values.
        ambiguous : 'infer', bool-ndarray, 'NaT', default 'raise'
            Only relevant for DatetimeIndex:

            - 'infer' will attempt to infer fall dst-transition hours based on
              order. Requires that the timestamps are monotonically increasing.
            - bool-ndarray where True signifies a DST time, False designates
              a non-DST time (note that this flag is only applicable for
              ambiguous times)
            - 'NaT' will return NaT where there are ambiguous times
            - 'raise' will raise a ValueError if there are ambiguous
              times.

        nonexistent : 'shift_forward', 'shift_backward', 'NaT', timedelta,             default 'raise'
            A nonexistent time does not exist in a particular timezone
            where clocks moved forward due to DST.

            - 'shift_forward' will shift the nonexistent time forward to the
              closest existing time
            - 'shift_backward' will shift the nonexistent time backward to the
              closest existing time
            - 'NaT' will return NaT where there are nonexistent times
            - timedelta objects will shift nonexistent times by the timedelta
            - 'raise' will raise a ValueError if there are
              nonexistent times.

        Returns
        -------
        DatetimeIndex, TimedeltaIndex, or Series
            Index of the same type for a DatetimeIndex or TimedeltaIndex,
            or a Series with the same index for a Series.

        Raises
        ------
        ValueError if the `freq` cannot be converted.

        See Also
        --------
        DatetimeIndex.floor :
            Perform floor operation on the data to the specified `freq`.
        DatetimeIndex.snap :
            Snap time stamps to nearest occurring frequency.

        Notes
        -----
        If the timestamps have a timezone, flooring will take place relative to the
        local ("wall") time and re-localized to the same timezone. When flooring
        near daylight savings time, use ``nonexistent`` and ``ambiguous`` to
        control the re-localization behavior.

        Examples
        --------
        **DatetimeIndex**

        >>> rng = pd.date_range("1/1/2018 11:59:00", periods=3, freq="min")
        >>> rng
        DatetimeIndex(['2018-01-01 11:59:00', '2018-01-01 12:00:00',
                       '2018-01-01 12:01:00'],
                      dtype='datetime64[us]', freq='min')

        >>> rng.floor('h')
        DatetimeIndex(['2018-01-01 11:00:00', '2018-01-01 12:00:00',
                       '2018-01-01 12:00:00'],
                      dtype='datetime64[us]', freq=None)

        **Series**

        >>> pd.Series(rng).dt.floor("h")
        0   2018-01-01 11:00:00
        1   2018-01-01 12:00:00
        2   2018-01-01 12:00:00
        dtype: datetime64[us]

        When rounding near a daylight savings time transition, use ``ambiguous`` or
        ``nonexistent`` to control how the timestamp should be re-localized.

        >>> rng_tz = pd.DatetimeIndex(["2021-10-31 03:30:00"], tz="Europe/Amsterdam")

        >>> rng_tz.floor("2h", ambiguous=False)
        DatetimeIndex(['2021-10-31 02:00:00+01:00'],
                     dtype='datetime64[us, Europe/Amsterdam]', freq=None)

        >>> rng_tz.floor("2h", ambiguous=True)
        DatetimeIndex(['2021-10-31 02:00:00+02:00'],
                      dtype='datetime64[us, Europe/Amsterdam]', freq=None)
        )rƒ  r$   ÚMINUS_INFTYr‰  s       rs   ÚfloorzTimelikeOps.floore  s    € ðR �{‰{˜4¤×!4Ñ!4°iÀÓMÐMru   c                óF   — | j                  |t        j                  ||«      S )a�  
        Perform ceil operation on the data to the specified `freq`.

        This method rounds each datetime value in the Series/Index up to
        the specified frequency (i.e., towards positive infinity).

        Parameters
        ----------
        freq : str or Offset
            The frequency level to ceil the index to. Must be a fixed
            frequency like 's' (second) not 'ME' (month end). See
            :ref:`frequency aliases <timeseries.offset_aliases>` for
            a list of possible `freq` values.
        ambiguous : 'infer', bool-ndarray, 'NaT', default 'raise'
            Only relevant for DatetimeIndex:

            - 'infer' will attempt to infer fall dst-transition hours based on
              order. Requires that the timestamps are monotonically increasing.
            - bool-ndarray where True signifies a DST time, False designates
              a non-DST time (note that this flag is only applicable for
              ambiguous times)
            - 'NaT' will return NaT where there are ambiguous times
            - 'raise' will raise a ValueError if there are ambiguous
              times.

        nonexistent : 'shift_forward', 'shift_backward', 'NaT', timedelta,             default 'raise'
            A nonexistent time does not exist in a particular timezone
            where clocks moved forward due to DST.

            - 'shift_forward' will shift the nonexistent time forward to the
              closest existing time
            - 'shift_backward' will shift the nonexistent time backward to the
              closest existing time
            - 'NaT' will return NaT where there are nonexistent times
            - timedelta objects will shift nonexistent times by the timedelta
            - 'raise' will raise a ValueError if there are
              nonexistent times.

        Returns
        -------
        DatetimeIndex, TimedeltaIndex, or Series
            Index of the same type for a DatetimeIndex or TimedeltaIndex,
            or a Series with the same index for a Series.

        Raises
        ------
        ValueError if the `freq` cannot be converted.

        See Also
        --------
        DatetimeIndex.floor :
            Perform floor operation on the data to the specified `freq`.
        DatetimeIndex.snap :
            Snap time stamps to nearest occurring frequency.

        Notes
        -----
        If the timestamps have a timezone, ceiling will take place relative to the
        local ("wall") time and re-localized to the same timezone. When ceiling
        near daylight savings time, use ``nonexistent`` and ``ambiguous`` to
        control the re-localization behavior.

        Examples
        --------
        **DatetimeIndex**

        >>> rng = pd.date_range("1/1/2018 11:59:00", periods=3, freq="min")
        >>> rng
        DatetimeIndex(['2018-01-01 11:59:00', '2018-01-01 12:00:00',
                       '2018-01-01 12:01:00'],
                      dtype='datetime64[us]', freq='min')

        >>> rng.ceil('h')
        DatetimeIndex(['2018-01-01 12:00:00', '2018-01-01 12:00:00',
                       '2018-01-01 13:00:00'],
                      dtype='datetime64[us]', freq=None)

        **Series**

        >>> pd.Series(rng).dt.ceil("h")
        0   2018-01-01 12:00:00
        1   2018-01-01 12:00:00
        2   2018-01-01 13:00:00
        dtype: datetime64[us]

        When rounding near a daylight savings time transition, use ``ambiguous`` or
        ``nonexistent`` to control how the timestamp should be re-localized.

        >>> rng_tz = pd.DatetimeIndex(["2021-10-31 01:30:00"], tz="Europe/Amsterdam")

        >>> rng_tz.ceil("h", ambiguous=False)
        DatetimeIndex(['2021-10-31 02:00:00+01:00'],
                      dtype='datetime64[us, Europe/Amsterdam]', freq=None)

        >>> rng_tz.ceil("h", ambiguous=True)
        DatetimeIndex(['2021-10-31 02:00:00+02:00'],
                      dtype='datetime64[us, Europe/Amsterdam]', freq=None)
        )rƒ  r$   Ú
PLUS_INFTYr‰  s       rs   ÚceilzTimelikeOps.ceilÐ  s    € ðR �{‰{˜4¤×!3Ñ!3°YÀÓLÐLru   Nrò  c               ód   — t        j                  | j                  ||| j                  «       ¬«      S ©Nr  )rQ   ÚnananyrŽ   rN   ©r€   ró  rÉ  s      rs   rE  zTimelikeOps.any>	  s!   € ä�}‰}˜TŸ]™]°¸fÈ4Ï9É9Ë;ÔWÐWru   c               ód   — t        j                  | j                  ||| j                  «       ¬«      S r’  )rQ   ÚnanallrŽ   rN   r”  s      rs   r  zTimelikeOps.allB	  s#   € ô �}‰}˜TŸ]™]°¸fÈ4Ï9É9Ë;ÔWÐWru   c                ó€   •— t        | j                  t        j                  «      r| j                  S t        ‰| �  «       S rp   )rz   r{   rÈ   rŽ   r×   Ú_values_for_json)r€   rÙ   s    €rs   r˜  zTimelikeOps._values_for_jsonJ	  s-   ø€ ä�d—j‘j¤"§(¡(Ô+Ø—=‘=Ð Ü‰wÑ'Ó)Ð)ru   c                ól   •— |r"t        dt        | «      j                  › d�«      ‚t        ‰| �  |¬«      S )NzThe 'sort' keyword in z_.factorize is not supported. To factorize with sort, call pd.factorize(obj, sort=True) instead.)Úuse_na_sentinel)ÚNotImplementedErrorrò   ró   r×   Ú	factorize)r€   rš  ÚsortrÙ   s      €rs   rœ  zTimelikeOps.factorizeP	  sF   ø€ ñ
 Ü%Ø(¬¨d«×)<Ñ)<Ð(=ð >ð óð ô
 ‰wÑ °Ð ÓAÐAru   c          
     óø   — |dk7  rt         ‚|s| j                  }	n| j                  j                  «       }	t        j                  |	f||||||dœ|¤Ž |s| S t        | «      j                  |	| j                  ¬«      S )z2
        See NDFrame.interpolate.__doc__.
        Úlinear)r~  ró  rl  r,  Úlimit_directionÚ
limit_arearÆ   )r›  rŽ   r˜   rP   Úinterpolate_2d_inplacerò   r/  r{   )
r€   r~  ró  rl  r,  r   r¡  r˜   r‚   Úout_datas
             rs   ÚinterpolatezTimelikeOps.interpolate]	  sŠ   € ð  �XÒÜ%Ð%áØ—}‘}‰Hà—}‘}×)Ñ)Ó+ˆHä×&Ñ&Øð		
àØØØØ+Ø!ñ		
ð ò		
ñ ØˆKÜ�D‹z×%Ñ% h°d·j±jÐ%ÓAÐAru   c                ó
  — t        j                  | j                  «      sy| j                  }|t        k7  }t        | j                  «      }t        |«      }t        j                  |||z  dk7  «      j                  «       dk(  }|S )zÓ
        Check if we are round times at midnight (and no timezone), which will
        be given a more compact __repr__ than other cases. For TimedeltaArray
        we are checking for multiples of 24H.
        Fr   )
r   r„  r{   rº   r    r   r#   rÈ   Úlogical_andr  )r€   Ú
values_intÚconsider_valuesrá   ÚppdÚ	even_dayss         rs   Ú_is_dates_onlyzTimelikeOps._is_dates_only†	  ss   € ô �‰˜tŸz™zÔ*àà—Y‘Yˆ
Ø$¬Ñ,ˆÜ" 4§:¡:Ó.ˆÜ˜dÓ#ˆô —N‘N ?°JÀÑ4DÈÑ4IÓJ×NÑNÓPÐTUÑUˆ	ØÐru   )r–   r�   r<  r�   r@  )r—   r   r<  r>  )rg  rD  r<  r
   )r<  rH  )r<  rh   rC  )r  rh   r  r?  r<  r
   )r}  znp.ufuncr~  r  )Úraiser¬  )r�  r5   r‚  r6   r<  r
   )ró  rG  rÉ  r?  r<  r?  r?  )TF)rš  r?  r�  r?  )
r~  r/   ró  rH  rl  rj   r˜   r?  r<  r
   r;  )ró   rJ  rK  rL  ÚclassmethodrY  r[  r»   r   ro  rj  r=   rè   r  r  r@  r|  rƒ  rŠ  r�  r�  rE  r  r˜  rœ  r¤  rN  r«  rO  rP  s   @rs   r_  r_    sÕ  ø„ ñð ñ'ó ð'ó(óIð Øò,ó ó ð,ð\ ð'Ø",ð'à	ò'ó ð'ð ò8ó ð8ð ò)ó ð)ô89
òzõ	Iò:ð2 $+Ø'.ð	jTð !ðjTð %ð	jTð
 
ójTð^ $+Ø'.ð	iNð !ðiNð %ð	iNð
 
óiNð\ $+Ø'.ð	iMð !ðiMð %ð	iMð
 
óiMð\ -1Àõ Xð -1Àõ Xõ*ð !%ØðBàðBð õBð$Bð #ð$Bð ð	$Bð
 ð$Bð ð$Bð 
ó$BðR òó ôru   r_  c                óJ  — t        | d«      sGt        | t        t        f«      s#t	        j
                  | «      dk(  rt        | «      } t        | «      } d}n,t        | t        «      rt        d|› d�«      ‚t        | d¬«      } t        | t        «      s(t        | t        «      r2| j                  j                  dv r| j                  d	t        ¬
«      } d}n±t        | t        «      r#| j!                  «       } | j                  «       } d}n~t        | t        j"                  t$        f«      st	        j&                  | «      } nHt        | t(        «      r8| j*                  j-                  | j.                  dt0        ¬«      j2                  } d}| j
                  dk(  rt5        d|› d�«      ‚| |fS )Nr{   r   FzCannot create a z from a MultiIndex.Tr  rä   rð   rU  )Ú
allow_fillrI  zCannot construct z from 0-dim input)r  rz   rÉ   ÚtuplerÈ   r·   r?   rL   rñ   r_   r\   rZ   r{   rç   r8  r    Ú_maybe_convert_datelike_arrayr!  r[   rô   rK   r#  ÚtakeÚcodesr   Ú_valuesrÇ   )r–   r˜   Úcls_names      rs   Ú!ensure_arraylike_for_datetimeliker¶   	  sU  € ô �4˜Ô!ä˜$¤¤u Ô.´2·7±7¸4³=ÀAÒ3Eä˜“:ˆDä6°tÓ<ˆØ‰Ü	�Dœ-Ô	(ÜÐ*¨8¨*Ð4GÐHÓIÐIä˜T°Ô6ˆä�$œÔ%Ü�4Ô,Ô-°$·*±*·/±/ÀTÑ2Ià�}‰}˜W¬tˆ}Ó4ˆØ‰Ü	�DÔ-Ô	.Ø×1Ñ1Ó3ˆØ�}‰}‹ˆØ‰Ü˜œrŸz™z¬>Ð:Ô;ä�z‰z˜$Ó‰ä	�Dœ.Ô	)ð �‰×#Ñ# D§J¡J¸4ÌCÐ#ÓP×XÑXˆØˆà‡y�y�A‚~ÜÐ,¨X¨JÐ6GÐHÓIÐIà�ˆ:Ðru   c                 ó   — y rp   r‘   ©rg  s    rs   Úvalidate_periodsr¹  Ê	  s   € Ø-0ru   c                 ó   — y rp   r‘   r¸  s    rs   r¹  r¹  Î	  s   € Ø+.ru   c                óP   — | �#t        j                  | «      st        d| › �«      ‚| S )a.  
    If a `periods` argument is passed to the Datetime/Timedelta Array/Index
    constructor, cast it to an integer.

    Parameters
    ----------
    periods : None, int

    Returns
    -------
    periods : None or int

    Raises
    ------
    TypeError
        if periods is not None or int
    z periods must be an integer, got )r   rØ  rñ   r¸  s    rs   r¹  r¹  Ò	  s/   € ð$ Ð¤3§>¡>°'Ô#:ÜÐ:¸7¸)ÐDÓEÐEð €Nru   c                óð   — t        | t        «      r| j                  S t        | t        «      r3| j                  dvrt        d| ›d�«      ‚| j                  j                  S t        j                  | «      d   S )zç
    Return the unit str corresponding to the dtype's resolution.

    Parameters
    ----------
    dtype : DatetimeTZDtype or np.dtype
        If np.dtype, we assume it is a datetime64 dtype.

    Returns
    -------
    str
    rå   zdtype=z does not have a resolution.r   )	rz   rH   r  rF   rç   rÇ   Úpyarrow_dtyperÈ   Údatetime_datarÆ   s    rs   rs  rs  ë	  sk   € ô �%œÔ)Ø�z‰zÐÜ	�Eœ:Ô	&Ø�:‰:˜TÑ!Ü  ˜xÐ'CÐDÓEÐEØ×"Ñ"×'Ñ'Ð'Ü×Ñ˜EÓ" 1Ñ%Ð%ru   )rq   r  )r†   r.   r<  r.   )r˜   r?  rµ  r  r<  ztuple[ArrayLike, bool])rg  r>  r<  r>  )rg  rH  r<  rH  )rg  rD  r<  rD  )r{   z'DatetimeTZDtype | np.dtype | ArrowDtyper<  r  )¢Ú
__future__r   r   r   Ú	functoolsr   rc  Útypingr   r   r	   r
   r   r   r   r   r  ÚnumpyrÈ   Úpandas._configr   Úpandas._config.configr   rÇ  Úpandas._libsr   r   r0  r   Úpandas._libs.tslibsr   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   Úpandas._libs.tslibs.fieldsr$   r%   Úpandas._libs.tslibs.np_datetimer&   Úpandas._libs.tslibs.timedeltasr'   Úpandas._libs.tslibs.timestampsr(   Úpandas._typingr)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   Úpandas.compat.numpyr8   rõ  Úpandas.errorsr9   r:   r;   r<   Úpandas.util._decoratorsr=   Úpandas.util._exceptionsr>   Úpandas.core.dtypes.castr?   Úpandas.core.dtypes.commonr@   rA   rB   rC   rD   rE   Úpandas.core.dtypes.dtypesrF   rG   rH   rI   rJ   Úpandas.core.dtypes.genericrK   rL   Úpandas.core.dtypes.missingrM   rN   Úpandas.corerO   rP   rQ   rR   Úpandas.core.algorithmsrS   rT   rU   Úpandas.core.array_algosrV   Úpandas.core.arraylikerW   Úpandas.core.arrays._mixinsrX   rY   Úpandas.core.arrays.arrow.arrayrZ   Úpandas.core.arrays.baser[   Úpandas.core.arrays.integerr\   Úpandas.core.constructionr]   r"  r^   r_   Úpandas.core.indexersr`   Úpandas.core.ops.commonra   Úpandas.core.ops.invalidrb   rc   Úpandas.tseriesrd   Úcollections.abcre   rf   rg   rh   r7  rj   r…  rk   rl   rm   rn   rM  rt   rˆ   rŠ   rR  r]  r_  r¶  r¹  rs  r‘   ru   rs   ú<module>rã     sº  ðÞ "÷õ Û ÷	÷ 	ó 	ó ã å -Ý :÷ñ ÷
÷ ÷ ÷ ó ÷$õ KÝ =Ý C÷÷ ÷ ÷ ñ õ" /÷ó õõ 5å K÷÷ ÷õ ÷÷÷
ó ÷ñ õ
 ?Ý *÷õ ?Ý 2Ý 3÷ñ õ
 7Ý ;÷õ
 'á÷ñ õ (å÷ñ ð .°Ñ7€ˆyÓ 7ó1ó
ô2[,˜XÐ'Bô [,ô|071Ð(ô 71ðt €ô}	Ð(ô }	ðH'Øð'Ø #ð'àó'ðT 
Ú 0ó 
Ø 0ð 
Ú .ó 
Ø .óô2&ru   