a
    iDf$u                     @  s  U d Z ddlmZ ddlZddlZddlZddlmZ ddlZ	ddl
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 zddlZW n ey   dZY n0 d
ZdZdZded< zejje fZ!W n e"y   e fZ!Y n0 dd Z#dd Z$dd Z%dGddZ&e&dddZ'e& Z(e&ddZ)e'e(e)gZ*dd Z+d d! Z,d"d# Z-d$d% Z.dHd'd(Z/d)d* Z0d+d, Z1dId/d0Z2dJd1d2Z3dKd3d4Z4G d5d6 d6ej5Z6d7d8 Z7d9d: Z8d;d< Z9d=d> Z:d?d@ Z;dAdB Z<dCdD Z=dEdF Z>dS )Lz0DatetimeIndex analog for cftime.datetime objects    )annotationsN	timedelta)Version)_STANDARD_CALENDARScftime_to_nptimeinfer_calendar_name)_contains_cftime_datetimes)OPTIONS)	is_scalar   d   
   ztuple[type[Exception], ...]OUT_OF_BOUNDS_TIMEDELTA_ERRORSc                 C  s   d|  d | d S )Nz(?P<>) )namepatternr   r   f/nfs/NAS7/SABIOD/METHODE/ermites/ermites_venv/lib/python3.9/site-packages/xarray/coding/cftimeindex.pynamedQ   s    r   c                 C  s   d|  d S )Nz(?:z)?r   )xr   r   r   optionalU   s    r   c                 C  s$   | sdS | d t t| dd   S )N r      )r   trailing_optional)xsr   r   r   r   Y   s    r   \-T\:c                 C  sn   d| ddf| ddf|ddf|ddf|ddfg}g }|D ]&\}}}| |rL|ndt||  q6d	t| d
 S )N)Nyearz\d{4}monthz\d{2}dayhourminutesecondr   ^$)appendr   r   )date_sepdatetime_septime_seppiecesZpattern_listsepr   Zsub_patternr   r   r   build_pattern_   s    r.   r   )r)   r+    )r*   c                 C  s8   t D ] }t|| }|r|   S qtd|  d S )Nz4no ISO-8601 or cftime-string-like match for string: )	_PATTERNSrematch	groupdict
ValueError)Zdatetime_stringr   r2   r   r   r   parse_iso8601_likeu   s    r5   c                 C  sj   t d u rtd| ddd}t|}i }dD ](}||d }|d ur,t|||< |}q,|jf i ||fS )NNo module named 'cftime'r   )r    r!   r"   r#   r$   r%   )cftimeModuleNotFoundErrorr5   getintreplace)	date_typeZtimestrdefaultresultr;   attrvalue
resolutionr   r   r   _parse_iso8601_with_reso   s    rB   c                 C  sp  |dkr2| |j dd| |j d ddtdd fS |dkr|jdkrb| |j d ddtdd }n| |j |jd dtdd }| |j |jd|fS |dkr| |j |j|j}||tddd fS |d	kr| |j |j|j|j}||tddd
 fS |dkr,| |j |j|j|j|j}||tddd fS |dkrh| |j |j|j|j|j|j}||tddd fS tdS )zGeneralization of
    pandas.tseries.index.DatetimeIndex._parsed_string_to_bounds
    for use with non-standard calendars and cftime.datetime
    objects.
    r    r   microsecondsr!      r"   )daysrD   r#   )hoursrD   r$   )minutesrD   r%   )secondsrD   N)r    r   r!   r"   r#   r$   r%   KeyError)r<   rA   parsedendstartr   r   r   _parsed_string_to_bounds   sB    


rO   c                   s   t j fdd| D t jdS )z(Adapted from pandas.tslib.get_date_fieldc                   s   g | ]}t | qS r   )getattr.0datefieldr   r   
<listcomp>       z"get_date_field.<locals>.<listcomp>dtype)nparrayint64)Z	datetimesrU   r   rT   r   get_date_field   s    r]   0.0c                   s$   |f fdd	} |_ ||_t|S )z1Adapted from pandas.tseries.index._field_accessorc                   sR   t d u rtdtt jt|kr.t| j S td dd| dt j dd S )Nr6   zThe z!rz2 accessor requires a minimum version of cftime of z . Found an installed version of .)r7   r8   r   __version__r]   _dataImportError)selfmin_cftime_versionr   r   r   f   s    
z_field_accessor.<locals>.f)__name____doc__property)r   	docstringrd   rf   r   re   r   _field_accessor   s    rk   c                 C  s   | j jrt| j d S d S d S )Nr   )ra   sizetyperc   r   r   r   get_date_type   s    ro   c                   sr   t d u rtdt| dkrn| d }t| t|t jsHtd  dt fdd| D sntd|  dd S )Nr6   r   z<CFTimeIndex requires cftime.datetime objects. Got object of r_   c                 3  s   | ]}t | V  qd S N)
isinstancerR   r@   r<   r   r   	<genexpr>   rW   z-assert_all_valid_date_type.<locals>.<genexpr>zGCFTimeIndex requires using datetime objects of all the same type.  Got
)r7   r8   lenrm   rq   datetime	TypeErrorall)datasampler   rs   r   assert_all_valid_date_type   s"    r{   , ,
c                 C  s   |d | tt|  | S )z&Format a single row from format_times.r/   )joinmapstr)timesindent	separatorrow_endr   r   r   
format_row   s    r   c                 C  s   t |tt|  d}tt| | }d}	t|D ]T}
|
dkrD|n|}|
|d krX|n|}| |
| |
d |  }|	t||||d7 }	q4|	S )z)Format values of cftimeindex as pd.Index.r   r   r   )r   r   r   )maxCFTIME_REPR_LENGTHru   mathceilranger   )index	max_widthoffsetr   first_row_offsetZintermediate_row_endlast_row_endZ	n_per_rowZn_rowsZrepresentationrowr   r   Ztimes_for_rowr   r   r   format_times   s    

r   c                 C  sH   d| j  dt|  | j| jd}dd | D }| |}|S )z.Format attributes of CFTimeIndex for __repr__.')rY   lengthcalendarfreqc                 S  s   g | ]\}}| d | qS )=r   )rR   kvr   r   r   rV     rW   z format_attrs.<locals>.<listcomp>)rY   ru   r   r   itemsr~   )r   r   attrs	attrs_strr   r   r   format_attrs  s    r   c                      sj  e Zd ZdZeddZeddZeddZedd	Zed
dZ	eddZ
eddZedddZedddZedddZeeZdOddZdd Zdd Zdd  Zd!d" Zd#d$ Z fd%d&Zd'd( Zd)d* Zd+d, Zd-d. Zd/d0d1d2d3Zd4d5 Zd6d7 Zd8d9 Z d:d; Z!dPd=d>Z"d?d@ Z#edAdB Z$edCdD Z%edEdF Z&dGdH Z'dIdJ Z(dKdL Z)dMdN Z*  Z+S )QCFTimeIndexaf  Custom Index for working with CF calendars and dates

    All elements of a CFTimeIndex must be cftime.datetime objects.

    Parameters
    ----------
    data : array or CFTimeIndex
        Sequence of cftime.datetime objects to use in index
    name : str, default: None
        Name of the resulting index

    See Also
    --------
    cftime_range
    r    zThe year of the datetimer!   zThe month of the datetimer"   zThe days of the datetimer#   zThe hours of the datetimer$   zThe minutes of the datetimer%   zThe seconds of the datetimemicrosecondz The microseconds of the datetimeZdayofyrz'The ordinal day of year of the datetimez1.0.2.1ZdayofwkzThe day of week of the datetimeZdaysinmonthz/The number of days in the month of the datetimez1.1.0.0Nc                 K  sJ   t | |d u r t|dr |j}t| }tj|dd|_||_i |_|S )Nr   OrX   )	r{   hasattrr   object__new__rZ   r[   ra   _cache)clsry   r   kwargsr>   r   r   r   r   >  s    
zCFTimeIndex.__new__c           	      C  s  t | j}td }t|d }t| tkr>t| j||dd}nRt| jdt ||ddd}t| jt d |||d}d|d	|  d
|g}t	| }| d| d| d}t||krt||| kr|
ddd	|d   }| d| dd	|d   | d}|S )zA
        Return a string representation for this object.
        display_width   r   )r   r   N,)r   r   r   
r/   z...z([z], r   r}   z],
r   )rm   rg   r
   ru   ITEMS_IN_REPR_MAX_ELSE_ELLIPSISr   values"REPR_ELLIPSIS_SHOW_ITEMS_FRONT_ENDr~   r   r;   )	rc   
klass_namer   r   ZdatastrZ	front_strZend_strr   Zfull_repr_strr   r   r   __repr__I  s8    

"zCFTimeIndex.__repr__c           
      C  s   t | j||\}}| j}| jrt|rZ||d k r>||d k sV||d krZ||d krZt|j|dd}|j|dd}t||S ||k}||k}	t	||	@ S )aY  Adapted from
        pandas.tseries.index.DatetimeIndex._partial_date_slice

        Note that when using a CFTimeIndex, if a partial-date selection
        returns a single element, it will never be converted to a scalar
        coordinate; this is in slight contrast to the behavior when using
        a DatetimeIndex, which sometimes will return a DataArray with a scalar
        coordinate depending on the resolution of the datetimes used in
        defining the index.  For example:

        >>> from cftime import DatetimeNoLeap
        >>> da = xr.DataArray(
        ...     [1, 2],
        ...     coords=[[DatetimeNoLeap(2001, 1, 1), DatetimeNoLeap(2001, 2, 1)]],
        ...     dims=["time"],
        ... )
        >>> da.sel(time="2001-01-01")
        <xarray.DataArray (time: 1)> Size: 8B
        array([1])
        Coordinates:
          * time     (time) object 8B 2001-01-01 00:00:00
        >>> da = xr.DataArray(
        ...     [1, 2],
        ...     coords=[[pd.Timestamp(2001, 1, 1), pd.Timestamp(2001, 2, 1)]],
        ...     dims=["time"],
        ... )
        >>> da.sel(time="2001-01-01")
        <xarray.DataArray ()> Size: 8B
        array(1)
        Coordinates:
            time     datetime64[ns] 8B 2001-01-01
        >>> da = xr.DataArray(
        ...     [1, 2],
        ...     coords=[[pd.Timestamp(2001, 1, 1, 1), pd.Timestamp(2001, 2, 1)]],
        ...     dims=["time"],
        ... )
        >>> da.sel(time="2001-01-01")
        <xarray.DataArray (time: 1)> Size: 8B
        array([1])
        Coordinates:
          * time     (time) datetime64[ns] 8B 2001-01-01T01:00:00
        r   rF   left)sideright)
rO   r<   ra   is_monotonic_increasingru   rK   ZsearchsortedslicerZ   Zflatnonzero)
rc   rA   rL   rN   rM   r   r   r   Zlhs_maskZrhs_maskr   r   r   _partial_date_slicep  s&    +




zCFTimeIndex._partial_date_slicec                 C  s@   t | j|\}}z| ||}W n ty:   t|Y n0 |S )zAAdapted from pandas.tseries.index.DatetimeIndex._get_string_slice)rB   r<   r   rK   )rc   keyrL   rA   locr   r   r   _get_string_slice  s    zCFTimeIndex._get_string_slicec           
      C  s   | j |d|d}| j |d|d}t| j| |j }t| j| |j }| jr`||k |dkB }n||k|dkB }t|||}	|dur| ||	|}	|	S )z.Adapted from pandas.Index._get_nearest_indexerpad)limitZbackfillrF   N)Zget_indexerabsr   r   rZ   where_filter_indexer_tolerance)
rc   targetr   	toleranceZleft_indexerZright_indexerZleft_distancesZright_distances	conditionindexerr   r   r   _get_nearest_indexer  s    z CFTimeIndex._get_nearest_indexerc                 C  sJ   t |tjr"t| j| |j }nt| j| | }t||k|d}|S )z3Adapted from pandas.Index._filter_indexer_tolerancerF   )rq   pdIndexr   r   rZ   r   )rc   r   r   r   Zdistancer   r   r   r     s
    z%CFTimeIndex._filter_indexer_tolerancec                   s$   t |tr| |S t |S dS )z7Adapted from pandas.tseries.index.DatetimeIndex.get_locN)rq   r   r   superget_locrc   r   	__class__r   r   r     s    

zCFTimeIndex.get_locc                 C  sb   t |ts|S t| j|\}}t| j||\}}| jrRt| dkrR|dkrN|S |S |dkr^|S |S )zXAdapted from
        pandas.tseries.index.DatetimeIndex._maybe_cast_slice_bound
        r   r   )rq   r   rB   r<   rO   Zis_monotonic_decreasingru   )rc   labelr   rL   rA   rN   rM   r   r   r   _maybe_cast_slice_bound  s    
z#CFTimeIndex._maybe_cast_slice_boundc                 C  sX   t |jt tkr |j| S t|trD|j| |j|j	|j
 S |j| | S dS )z9Adapted from pandas.tseries.index.DatetimeIndex.get_valueN)rZ   ZasarrayrY   boolZilocrq   r   Zslice_indexerrN   stopstepr   )rc   Zseriesr   r   r   r   	get_value  s
    

zCFTimeIndex.get_valuec              
   C  sR   z2|  |}t|p0t|tkp0t|tjo0|jW S  tt	t
fyL   Y dS 0 dS )zKAdapted from
        pandas.tseries.base.DatetimeIndexOpsMixin.__contains__FN)r   r   rm   r   rq   rZ   Zndarrayrl   rK   rw   r4   )rc   r   r>   r   r   r   __contains__  s    

zCFTimeIndex.__contains__c                 C  s
   |  |S )z-Needed for .loc based partial-string indexing)r   r   r   r   r   contains  s    zCFTimeIndex.containszint | floatzstr | timedelta)nr   c                 C  sP   t |tr| ||  S t |tr<ddlm} | |||  S td| ddS )aG  Shift the CFTimeIndex a multiple of the given frequency.

        See the documentation for :py:func:`~xarray.cftime_range` for a
        complete listing of valid frequency strings.

        Parameters
        ----------
        n : int, float if freq of days or below
            Periods to shift by
        freq : str or datetime.timedelta
            A frequency string or datetime.timedelta object to shift by

        Returns
        -------
        CFTimeIndex

        See Also
        --------
        pandas.DatetimeIndex.shift

        Examples
        --------
        >>> index = xr.cftime_range("2000", periods=1, freq="ME")
        >>> index
        CFTimeIndex([2000-01-31 00:00:00],
                    dtype='object', length=1, calendar='standard', freq=None)
        >>> index.shift(1, "ME")
        CFTimeIndex([2000-02-29 00:00:00],
                    dtype='object', length=1, calendar='standard', freq=None)
        >>> index.shift(1.5, "D")
        CFTimeIndex([2000-02-01 12:00:00],
                    dtype='object', length=1, calendar='standard', freq=None)
        r   )	to_offsetz6'freq' must be of type str or datetime.timedelta, got r_   N)rq   r   r   xarray.coding.cftime_offsetsr   rw   )rc   r   r   r   r   r   r   shift  s    "


zCFTimeIndex.shiftc                 C  s&   t |tjr| }tt| | S rp   rq   r   TimedeltaIndexto_pytimedeltar   rZ   r[   rc   otherr   r   r   __add__0  s    zCFTimeIndex.__add__c                 C  s&   t |tjr| }t|t|  S rp   r   r   r   r   r   __radd__5  s    zCFTimeIndex.__radd__c                 C  s   t |rtt| | S t|tjr<tt| |  S tt|rztt| t| W S  t	y   t
dY q0 ntS d S NzcThe time difference exceeds the range of values that can be expressed at the nanosecond resolution.)_contains_datetime_timedeltasr   rZ   r[   rq   r   r   r   r	   r   r4   NotImplementedr   r   r   r   __sub__:  s    zCFTimeIndex.__sub__c                 C  s6   zt |t|  W S  ty0   tdY n0 d S r   )r   r   rZ   r[   r   r4   r   r   r   r   __rsub__J  s    zCFTimeIndex.__rsub__Fc                 C  sP   | j jstg S t| }t| }|tvrF|sFtjd|dt	dd t|S )a  If possible, convert this index to a pandas.DatetimeIndex.

        Parameters
        ----------
        unsafe : bool
            Flag to turn off warning when converting from a CFTimeIndex with
            a non-standard calendar to a DatetimeIndex (default ``False``).

        Returns
        -------
        pandas.DatetimeIndex

        Raises
        ------
        ValueError
            If the CFTimeIndex contains dates that are not possible in the
            standard calendar or outside the nanosecond-precision range.

        Warns
        -----
        RuntimeWarning
            If converting from a non-standard calendar to a DatetimeIndex.

        Warnings
        --------
        Note that for non-standard calendars, this will change the calendar
        type of the index.  In that case the result of this method should be
        used with caution.

        Examples
        --------
        >>> times = xr.cftime_range("2000", periods=2, calendar="gregorian")
        >>> times
        CFTimeIndex([2000-01-01 00:00:00, 2000-01-02 00:00:00],
                    dtype='object', length=2, calendar='standard', freq=None)
        >>> times.to_datetimeindex()
        DatetimeIndex(['2000-01-01', '2000-01-02'], dtype='datetime64[ns]', freq=None)
        zBConverting a CFTimeIndex with dates from a non-standard calendar, z, to a pandas.DatetimeIndex, which uses dates from the standard calendar.  This may lead to subtle errors in operations that depend on the length of time between dates.r   )
stacklevel)
ra   rl   r   ZDatetimeIndexr   r   r   warningswarnRuntimeWarning)rc   unsafeZnptimesr   r   r   r   to_datetimeindexS  s    (
	zCFTimeIndex.to_datetimeindexc                   s   t  fdd| jD S )a  
        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-strptime-behavior>`__

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

        Returns
        -------
        pandas.Index
            Index of formatted strings

        Examples
        --------
        >>> rng = xr.cftime_range(
        ...     start="2000", periods=5, freq="2MS", calendar="noleap"
        ... )
        >>> rng.strftime("%B %d, %Y, %r")
        Index(['January 01, 2000, 12:00:00 AM', 'March 01, 2000, 12:00:00 AM',
               'May 01, 2000, 12:00:00 AM', 'July 01, 2000, 12:00:00 AM',
               'September 01, 2000, 12:00:00 AM'],
              dtype='object')
        c                   s   g | ]}|  qS r   )strftimerQ   date_formatr   r   rV     rW   z(CFTimeIndex.strftime.<locals>.<listcomp>)r   r   ra   )rc   r   r   r   r   r     s    zCFTimeIndex.strftimec                   sT   ddl m | jjs$tjg tjdS | ddd tj fdd| jD tjdS )z@Convert to integers with units of microseconds since 1970-01-01.r   ) exact_cftime_datetime_differencerX     r   c                   s   g | ]}t  |qS r   )_total_microsecondsrQ   epochr   r   r   rV     s   z$CFTimeIndex.asi8.<locals>.<listcomp>)	Zxarray.core.resample_cftimer   ra   rl   rZ   r[   r\   r<   r   rn   r   r   r   asi8  s    zCFTimeIndex.asi8c                 C  s    ddl m} | jjsdS || S )z0The calendar used by the datetimes in the index.r   )r   N)xarray.coding.timesr   ra   rl   )rc   r   r   r   r   r     s    zCFTimeIndex.calendarc                 C  s$   ddl m} | jjdk rdS || S )z-The frequency used by the dates in the index.r   )
infer_freq   N)Zxarray.coding.frequenciesr   ra   rl   )rc   r   r   r   r   r     s    zCFTimeIndex.freqc           	      C  sr   ddl m}m} | jjs&tt| S ||}t||sFt	| dt
| }| j}|||}t|| j| jS )z%Round dates using a specified method.r   )CFTIME_TICKSr   z is a non-fixed frequency)r   r   r   ra   rl   r   rZ   r[   rq   r4   r   Zas_timedeltar   _cftimeindex_from_i8r<   r   )	rc   r   methodr   r   r   unitr   Zroundedr   r   r   _round_via_method  s    

zCFTimeIndex._round_via_methodc                 C  s   |  |tS )a  Round dates down to fixed frequency.

        Parameters
        ----------
        freq : str
            The frequency level to round the index to.  Must be a fixed
            frequency like 'S' (second) not 'ME' (month end).  See `frequency
            aliases <https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`_
            for a list of possible values.

        Returns
        -------
        CFTimeIndex
        )r   
_floor_intrc   r   r   r   r   floor  s    zCFTimeIndex.floorc                 C  s   |  |tS )a  Round dates up to fixed frequency.

        Parameters
        ----------
        freq : str
            The frequency level to round the index to.  Must be a fixed
            frequency like 'S' (second) not 'ME' (month end).  See `frequency
            aliases <https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`_
            for a list of possible values.

        Returns
        -------
        CFTimeIndex
        )r   	_ceil_intr   r   r   r   r     s    zCFTimeIndex.ceilc                 C  s   |  |tS )a  Round dates to a fixed frequency.

        Parameters
        ----------
        freq : str
            The frequency level to round the index to.  Must be a fixed
            frequency like 'S' (second) not 'ME' (month end).  See `frequency
            aliases <https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`_
            for a list of possible values.

        Returns
        -------
        CFTimeIndex
        )r   _round_to_nearest_half_evenr   r   r   r   round  s    zCFTimeIndex.round)N)F),rg   
__module____qualname__rh   rk   r    r!   r"   r#   r$   r%   r   Z	dayofyearZ	dayofweekZdays_in_monthri   ro   r<   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   __classcell__r   r   r   r   r     sX   







'@			-	
9

	

r   c                 C  s   t | |\}}|S rp   )rB   )r<   Zdatetime_strrS   _r   r   r   _parse_iso8601_without_reso  s    r  c                   s$   t  fdd|  D | jS )a  Create a numpy array from an array of strings.

    For use in generating dates from strings for use with interp.  Assumes the
    array is either 0-dimensional or 1-dimensional.

    Parameters
    ----------
    strings : array of strings
        Strings to convert to dates
    date_type : cftime.datetime type
        Calendar type to use for dates

    Returns
    -------
    np.array
    c                   s   g | ]}t  |qS r   )r  )rR   srs   r   r   rV   +  rW   z2_parse_array_of_cftime_strings.<locals>.<listcomp>)rZ   r[   ZravelZreshapeshape)stringsr<   r   rs   r   _parse_array_of_cftime_strings  s
    r  c                 C  s   t | } t| d tS )z<Check if an input array contains datetime.timedelta objects.r   )rZ   Z
atleast_1drq   r   )r[   r   r   r   r   /  s    
r   c                   s0   |ddd t  fdd| D }t||dS )a@  Construct a CFTimeIndex from an array of integers.

    Parameters
    ----------
    values : np.array
        Integers representing microseconds since 1970-01-01.
    date_type : cftime.datetime
        Type of date for the index.
    name : str
        Name of the index.

    Returns
    -------
    CFTimeIndex
    r   r   c                   s   g | ]} t t|d  qS )rC   )r   r:   rr   r   r   r   rV   F  rW   z(_cftimeindex_from_i8.<locals>.<listcomp>re   )rZ   r[   r   )r   r<   r   datesr   r  r   r   5  s    r   c                 C  s   | t dd S )zCompute the total number of microseconds of a datetime.timedelta.

    Parameters
    ----------
    delta : datetime.timedelta
        Input timedelta.

    Returns
    -------
    int
    r   rC   r   )deltar   r   r   r   J  s    r   c                 C  s   | t | | S Copied from pandas.rZ   	remainderr   r   r   r   r   r   Y  s    r   c                 C  s   | t |  | S r
  r  r  r   r   r   r   ^  s    r   c                 C  sj   |d rt | |d  |S t| |\}}t||d kt||d k|d }||  d7  < || S )r  r   r   )r   rZ   divmod
logical_orlogical_and)r   r   Zquotientr  maskr   r   r   r   c  s     r   )r   r   r   )Nr^   )r   r|   r}   )r|   r   r}   r   )r|   )?rh   
__future__r   r   r1   r   rv   r   numpyrZ   Zpandasr   Zpackaging.versionr   r   r   r   r   Zxarray.core.commonr	   Zxarray.core.optionsr
   Zxarray.core.utilsr   r7   rb   r   r   r   __annotations__errorsZOutOfBoundsTimedeltaOverflowErrorr   AttributeErrorr   r   r   r.   Z_BASIC_PATTERNZ_EXTENDED_PATTERNZ_CFTIME_PATTERNr0   r5   rB   rO   r]   rk   ro   r{   r   r   r   r   r   r  r  r   r   r   r   r   r   r   r   r   r   <module>   st   )




,

	    

   z