U
    f/e                     @   s   d Z ddlZddlZddlmZ ejZeeZeedk Z	eedk Z
eedk Zejdk	ZdZeeek rede d	e d
e dedZdd ZdeedddZdddZdddgZdS )z- support numpy compatibility across versions     N)Versionz1.18z1.19z1.20z1.17.3z4this version of pandas is incompatible with numpy < z
your numpy version is z.
Please upgrade numpy to >= z to use this pandas versionz	[+-]0000$c                 C   s<   t | tr8| dr"| d d } nt| r8| d d } | S )NZ)
isinstancestrendswith	_tz_regexsearch)tstring r   @/tmp/pip-unpacked-wheel-tiezk1ph/pandas/compat/numpy/__init__.py_tz_replacer   s    


r   nsr   unitc                 C   s   t | } t| |S )z
    provide compat for construction of strings to numpy datetime64's with
    tz-changes in 1.11 that make '2015-01-01 09:00:00Z' show a deprecation
    warning, when need to pass '2015-01-01 09:00:00'
    )r   npZ
datetime64r   r   r   r   np_datetime64_compat'   s    r   M8[ns]c                 C   s>   t | dr(t| ttfs(dd | D } nt| } tj| |dS )z
    provide compat for construction of an array of strings to a
    np.array(..., dtype=np.datetime64(..))
    tz-changes in 1.11 that make '2015-01-01 09:00:00Z' show a deprecation
    warning, when need to pass '2015-01-01 09:00:00'
    __iter__c                 S   s   g | ]}t |qS r   )r   ).0sr   r   r   
<listcomp>:   s     z.np_array_datetime64_compat.<locals>.<listcomp>)dtype)hasattrr   r   bytesr   r   array)Zarrr   r   r   r   np_array_datetime64_compat1   s    r   r   _np_versionis_numpy_dev)r   )r   )__doc__reZnumpyr   Zpandas.util.versionr   __version__r   Z_nlvZnp_version_under1p18Znp_version_under1p19Znp_version_under1p20devr   Z_min_numpy_verImportErrorcompiler	   r   r   r   r   __all__r   r   r   r   <module>   s,   

	

