a
    nÝEbá  ã                
   @   s^  d dl 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 ejddd dgdd	gd
�dd„ ƒZejdejdejd�gd�dd„ ƒZdd„ ejejejfD ƒZe dd„ ejejfD ƒ¡ e dd„ ejejejfD ƒ¡ e ejdejd�g¡ e g d¢¡ ejed�dd„ ƒZeje
ejddd�ƒeejddd�ƒeejddd�ƒedƒgdd„ d �d!d"„ ƒZeje d#¡ ¡ e d#¡e d#¡ ¡ gd$d„ d �d%d&„ ƒZ ejej! "d'¡ej! #d(¡ejd'd)� ¡ e d*¡e $d'd+¡e $d(d,¡gd-d„ d �d.d/„ ƒZ%ejej! #d0¡ej! &d1¡ejd0d2� ¡ ejd3d4�e $d0d,¡e $d1d5¡gd6d„ d �d7d8„ ƒZ'ej! (d0¡ej! )d¡ej! &¡ gZ*ejejd9d:� ¡ e $d9d;¡ejd9d4�ge* d�d<d=„ ƒZ+eje $d>d,¡ejd?d2� ¡ e d@¡ge* d�dAdB„ ƒZ,eje $dCd+¡ejdCd)� ¡ ejdCd)�ge* d�dDdE„ ƒZ-ejejej.ej/eje0gdFd„ d �dGdH„ ƒZ1dS )Ié    N)Ú
RangeIndex)ÚFloat64IndexÚ
Int64IndexÚUInt64Index)ÚexpressionsTÚmodulei@B ZnumexprÚpython)ZautouseÚscopeÚparamsÚidsc                 c   s    t j}| jt _| jV  |t _d S ©N)ÚexprÚ_MIN_ELEMENTSÚparam)Úrequestr   © r   ú`/home/ja/django-apps/lartica_env/lib/python3.9/site-packages/pandas/tests/arithmetic/conftest.pyÚswitch_numexpr_min_elements   s    r   é   ©Údtype)r
   c                 C   s   | j S )a@  
    Several variants of integer value 1. The zero-dim integer array
    behaves like an integer.

    This fixture can be used to check that datetimelike indexes handle
    addition and subtraction of integers and zero-dimensional arrays
    of integers.

    Examples
    --------
    dti = pd.date_range('2016-01-01', periods=2, freq='H')
    dti
    DatetimeIndex(['2016-01-01 00:00:00', '2016-01-01 01:00:00'],
    dtype='datetime64[ns]', freq='H')
    dti + one
    DatetimeIndex(['2016-01-01 01:00:00', '2016-01-01 02:00:00'],
    dtype='datetime64[ns]', freq='H')
    ©r   ©r   r   r   r   Úone   s    r   c                 C   s4   g | ],}t jt jt jfD ]}|d gd |d�‘qqS )r   é   r   )ÚnpÚint64Úuint64Úfloat64)Ú.0Úbox_clsr   r   r   r   Ú
<listcomp>5   s   þr!   c                 C   s    g | ]}|d gd t jd�‘qS )ç       €r   r   )r   r   )r   r    r   r   r   r!   ;   ó    c                 C   s   g | ]}t jd |d�‘qS )r   r   )r   Úarray)r   r   r   r   r   r!   =   r#   r"   )r   g        r"   c                 C   s   | j S )a»  
    Several types of scalar zeros and length 5 vectors of zeros.

    This fixture can be used to check that numeric-dtype indexes handle
    division by any zero numeric-dtype.

    Uses vector of length 5 for broadcasting with `numeric_idx` fixture,
    which creates numeric-dtype vectors also of length 5.

    Examples
    --------
    arr = RangeIndex(5)
    arr / zeros
    Float64Index([nan, inf, inf, inf, inf], dtype='float64')
    r   r   r   r   r   ÚzeroE   s    r%   r   r   r   r   c                 C   s
   t | ƒjS r   ©ÚtypeÚ__name__©Úxr   r   r   Ú<lambda>d   r#   r+   )r
   r   c                 C   s   | j S )z7
    Several types of numeric-dtypes Index objects
    r   r   r   r   r   Únumeric_idx]   s    r,   Z10m7sc                 C   s
   t | ƒjS r   r&   r)   r   r   r   r+   w   r#   c                 C   s   | j S )zV
    Several variants of Timedelta scalars representing 10 minutes and 7 seconds.
    r   r   r   r   r   Ú	scalar_tdq   s    r-   é   éH   )Údaysz72:00:00ÚDÚhc                 C   s
   t | ƒjS r   r&   r)   r   r   r   r+   ‰   r#   c                 C   s   | j S )za
    Several timedelta-like and DateOffset objects that each represent
    a 3-day timedelta
    r   r   r   r   r   Ú
three_days€   s    r3   é   éx   )Úhoursi   )ÚsecondsÚmc                 C   s
   t | ƒjS r   r&   r)   r   r   r   r+   œ   r#   c                 C   s   | j S )zb
    Several timedelta-like and DateOffset objects that each represent
    a 2-hour timedelta
    r   r   r   r   r   Ú	two_hours“   s    r9   é   )ÚminutesÚsc                 C   s   | j S )zp
    Several timedelta-like and DateOffset instances that are _not_
    compatible with Hourly frequencies.
    r   r   r   r   r   Ú
not_hourly­   s    r=   é   é   z23:00:00c                 C   s   | j S )zo
    Several timedelta-like and DateOffset instances that are _not_
    compatible with Daily frequencies.
    r   r   r   r   r   Ú	not_daily½   s    r@   im  c                 C   s   | j S )z{
    Several timedelta-like and DateOffset instances that are _not_
    compatible with Monthly or Annual frequencies.
    r   r   r   r   r   Úmismatched_freqÍ   s    rA   c                 C   s   | j S r   )r(   r)   r   r   r   r+   á   r#   c                 C   s   | j S )zc
    Fixture to test behavior for Index, Series, tm.to_array, numpy Array and list
    classes
    r   r   r   r   r   Úbox_1d_arrayà   s    rB   )2Únumpyr   ZpytestZpandasÚpdr   Zpandas._testingZ_testingÚtmZpandas.core.apir   r   r   Zpandas.core.computationr   r   Zfixturer   r$   r   r   ÚIndexZzerosÚextendr   r   r%   Zaranger,   Z	TimedeltaZto_pytimedeltaZto_timedelta64r-   ÚoffsetsZDayZHourZtimedelta64r3   ZMinuter9   Z	YearBeginZ
MonthBeginZ_common_mismatchr=   r@   rA   ZSeriesZto_arrayÚlistrB   r   r   r   r   Ú<module>   sÂ   ÿ

þÿ 

üù	
ýú




ú÷





ú÷
	

ý

ýûÿ

ýûÿ


ýûÿ
ÿ