U
    Cvft                     @  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k
r   dZY nX d
ZdZdZded< zejje fZ!W n e"k
r   e fZ!Y nX 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   =/tmp/pip-unpacked-wheel-h316xyqg/xarray/coding/cftimeindex.pynamedP   s    r   c                 C  s   d|  d S )Nz(?:z)?r   )xr   r   r   optionalT   s    r   c                 C  s$   | sdS | d t t| dd   S )N r      )r   trailing_optional)xsr   r   r   r   X   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_liket   s    r5   c                 C  sf   t d krtd| ddd}t|}i }dD ](}||d }|d k	r,t|||< |}q,|jf ||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   sJ    

    
rO   c                   s   t  fdd| D S )z(Adapted from pandas.tslib.get_date_fieldc                   s   g | ]}t | qS r   )getattr.0datefieldr   r   
<listcomp>   s     z"get_date_field.<locals>.<listcomp>)nparray)Z	datetimesrU   r   rT   r   get_date_field   s    rY   0.0c                   s$   |f fdd	} |_ ||_t|S )z1Adapted from pandas.tseries.index._field_accessorc                   sR   t d k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__rY   _dataImportError)selfmin_cftime_versionr   r   r   f   s    z_field_accessor.<locals>.f)__name____doc__property)r   Z	docstringr`   rb   r   ra   r   _field_accessor   s    rf   c                 C  s   | j jrt| j d S d S d S )Nr   )r]   sizetyper_   r   r   r   get_date_type   s    rj   c                   sn   t d krtdt| dkrj| d }t| t|t jsFtd t fdd| D sjtd| d S )Nr6   r   z?CFTimeIndex requires cftime.datetime objects. Got object of {}.c                 3  s   | ]}t | V  qd S N)
isinstancerR   r@   r<   r   r   	<genexpr>   s     z-assert_all_valid_date_type.<locals>.<genexpr>zJCFTimeIndex requires using datetime objects of all the same type.  Got
{}.)	r7   r8   lenrh   rl   datetime	TypeErrorformatall)datasampler   rn   r   assert_all_valid_date_type   s"    rw   , ,
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_LENGTHrp   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  sd   d| j  dt|  d| j dt| dkr:d| j dndd}dd | D }| |}|S )z.Format attributes of CFTimeIndex for __repr__.'   N)dtypelengthcalendarfreqc                 S  s   g | ]\}}| d | qS )=r   )rR   kvr   r   r   rV     s     z format_attrs.<locals>.<listcomp>)r   rp   r   r   itemsrz   )r   r   attrs	attrs_strr   r   r   format_attrs  s    r   c                      sl  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dPd'd(Zd)d* Zd+d, Zd-d. Zd/d0d1d2d3Zd4d5 Zd6d7 Zd8d9 Z d:d; Z!dQd=d>Z"d?d@ Z#edAdB Z$edCdD Z%edEdF Z&dGdH Z'dIdJ Z(dKdL Z)dMdN Z*  Z+S )R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 kr t|dr |j}t| }tj|dd|_||_i |_|S )Nr   Or   )	rw   hasattrr   object__new__rW   rX   r]   _cache)clsru   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   ry   z],
r   )rh   rc   r
   rp   ITEMS_IN_REPR_MAX_ELSE_ELLIPSISr   values"REPR_ELLIPSIS_SHOW_ITEMS_FRONT_ENDrz   r   r;   )	r_   
klass_namer   r   ZdatastrZ	front_strZend_strr   Zfull_repr_strr   r   r   __repr__H  s>    
   "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 )a5  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)>
        array([1])
        Coordinates:
          * time     (time) object 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 ()>
        array(1)
        Coordinates:
            time     datetime64[ns] 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)>
        array([1])
        Coordinates:
          * time     (time) datetime64[ns] 2001-01-01T01:00:00
        r   rF   left)sideright)
rO   r<   r]   is_monotonic_increasingrp   rK   ZsearchsortedslicerW   Zflatnonzero)
r_   rA   rL   rN   rM   r}   r   r   Zlhs_maskZrhs_maskr   r   r   _partial_date_sliceo  s&    +




zCFTimeIndex._partial_date_slicec                 C  sB   t | j|\}}z| ||}W n tk
r<   t|Y nX |S )zAAdapted from pandas.tseries.index.DatetimeIndex._get_string_slice)rB   r<   r   rK   )r_   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k	r| ||	|}	|	S )z.Adapted from pandas.Index._get_nearest_indexerpad)limitZbackfillrF   N)Zget_indexerabsr   r   rW   where_filter_indexer_tolerance)
r_   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   )rl   pdIndexr   r   rW   r   )r_   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)rl   r|   r   superget_locr_   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 )aJ  Adapted from
        pandas.tseries.index.DatetimeIndex._maybe_cast_slice_bound

        Note that we have never used the kind argument in CFTimeIndex and it is
        deprecated as of pandas version 1.3.0.  It exists only for compatibility
        reasons.  We can remove it when our minimum version of pandas is 1.3.0.
        r   r   )rl   r|   rB   r<   rO   Zis_monotonic_decreasingrp   )r_   labelr   kindrL   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)rW   Zasarrayr   boolZilocrl   r   Zslice_indexerrN   stopstepr   )r_   Zseriesr   r   r   r   	get_value  s
    

zCFTimeIndex.get_valuec              
   C  sT   z2|  |}t|p0t|tkp0t|tjo0|jW S  tt	t
fk
rN   Y dS X dS )zKAdapted from
        pandas.tseries.base.DatetimeIndexOpsMixin.__contains__FN)r   r   rh   r   rl   rW   Zndarrayrg   rK   rr   r4   )r_   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  sN   t |tr| ||  S t |tr<ddlm} | |||  S td|dS )aE  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="M")
        >>> index
        CFTimeIndex([2000-01-31 00:00:00],
                    dtype='object', length=1, calendar='standard', freq=None)
        >>> index.shift(1, "M")
        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_offsetz9'freq' must be of type str or datetime.timedelta, got {}.N)rl   r   r|   xarray.coding.cftime_offsetsr   rr   rs   )r_   r   r   r   r   r   r   shift  s    "

zCFTimeIndex.shiftc                 C  s&   t |tjr| }tt| | S rk   rl   r   TimedeltaIndexto_pytimedeltar   rW   rX   r_   otherr   r   r   __add__4  s    zCFTimeIndex.__add__c                 C  s&   t |tjr| }t|t|  S rk   r   r   r   r   r   __radd__9  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	k
r   t
dY qX ntS d S NzcThe time difference exceeds the range of values that can be expressed at the nanosecond resolution.)_contains_datetime_timedeltasr   rW   rX   rl   r   r   r   r	   r   r4   NotImplementedr   r   r   r   __sub__>  s    zCFTimeIndex.__sub__c                 C  s8   zt |t|  W S  tk
r2   tdY nX d S r   )r   r   rW   rX   r   r4   r   r   r   r   __rsub__N  s    zCFTimeIndex.__rsub__Fc                 C  s<   t | }t| }|tkr2|s2tj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 pandas.Timestamp-valid 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)
        zConverting a CFTimeIndex with dates from a non-standard calendar, {!r}, 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)	r   r   r   warningswarnrs   RuntimeWarningr   ZDatetimeIndex)r_   ZunsafeZnptimesr   r   r   r   to_datetimeindexW  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     s     z(CFTimeIndex.strftime.<locals>.<listcomp>)r   r   r]   )r_   r   r   r   r   r     s    zCFTimeIndex.strftimec                   s<   ddl m | 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_difference  r   c                   s   g | ]}t  |qS r   )_total_microsecondsrQ   epochr   r   r   rV     s   z$CFTimeIndex.asi8.<locals>.<listcomp>r   )Zxarray.core.resample_cftimer   r<   rW   rX   r   Zint64ri   r   r   r   asi8  s    zCFTimeIndex.asi8c                 C  s   ddl m} || S )z0The calendar used by the datetimes in the index.r   )r   )xarray.coding.timesr   )r_   r   r   r   r   r     s    zCFTimeIndex.calendarc                 C  s   ddl m} || S )z-The frequency used by the dates in the index.r   )
infer_freq)Zxarray.coding.frequenciesr   )r_   r   r   r   r   r     s    zCFTimeIndex.freqc           	      C  s\   ddl m}m} ||}t||s0t| 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   rl   r4   r   Zas_timedeltar   _cftimeindex_from_i8r<   r   )	r_   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r_   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)N)F),rc   
__module____qualname__rd   rf   r    r!   r"   r#   r$   r%   r   Z	dayofyearZ	dayofweekZdays_in_monthre   rj   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     s`   






    
'@		
	.	
5


r   c                 C  s   t | |\}}|S rk   )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   srn   r   r   rV     s     z2_parse_array_of_cftime_strings.<locals>.<listcomp>)rW   rX   ZravelZreshapeshape)stringsr<   r   rn   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   )rW   Z
atleast_1drl   r   )rX   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:   rm   r   r   r   rV   9  s     z(_cftimeindex_from_i8.<locals>.<listcomp>ra   )rW   rX   r   )r   r<   r   datesr   r  r   r   (  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   =  s    r   c                 C  s   | t | | S Copied from pandas.rW   	remainderr   r   r   r   r   r   L  s    r   c                 C  s   | t |  | S r  r
  r  r   r   r   r   Q  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   rW   divmod
logical_orlogical_and)r   r   Zquotientr  maskr   r   r   r   V  s    
 r   )r   r   r   )NrZ   )r   rx   ry   )rx   r   ry   r   )rx   )?rd   
__future__r   r   r1   r   rq   r   ZnumpyrW   Zpandasr   Zpackaging.versionr   r   r   r   r   Zxarray.core.commonr	   Zxarray.core.optionsr
   Zxarray.core.utilsr   r7   r^   r   r   r   __annotations__errorsZOutOfBoundsTimedeltaOverflowErrorr   AttributeErrorr   r   r   r.   Z_BASIC_PATTERNZ_EXTENDED_PATTERNZ_CFTIME_PATTERNr0   r5   rB   rO   rY   rf   rj   rw   r   r   r   r   r   r   r  r   r   r   r   r   r   r   r   r   r   <module>   st   (




,

	    

   n