3
®yb]  ã            	   @   sV  d dl Zd dlZd dlZd dljZdd„ Zej	dFdGdHgd�d	d
„ ƒZ
ej	dejdejd�gd�dd„ ƒZdd„ ejejgD ƒZejdd„ ejejgD ƒƒ ejdd„ ejejejgD ƒƒ ejejdIejd�gƒ ejd ddJgƒ ej	ed�dd„ ƒZej	ejejddd�ƒejejddd�ƒejejddd�ƒejdƒgdd„ d�dd„ ƒZej	ejdƒjƒ ejdƒejdƒjƒ gd d„ d�d!d"„ ƒZej	ejjd#ƒejj d$ƒejd#d%�jƒ ejd&ƒej!d#d'ƒej!d$d(ƒgd)d„ d�d*d+„ ƒZ"ej	ejj d,ƒejj#d-ƒejd,d.�jƒ ejdKd0�ej!d,d(ƒej!d-d1ƒgd2d„ d�d3d4„ ƒZ$ejj%d,ƒejj&dƒejj#ƒ gZ'ej	ejd5d6�jƒ ej!d5d7ƒejd5d0�ge' d�d8d9„ ƒZ(ej	ej!d:d(ƒejd;d.�jƒ ejd<ƒge' d�d=d>„ ƒZ)ej	ej!d?d'ƒejd?d%�jƒ ejd?d%�ge' d�d@dA„ ƒZ*ej	ejej+ej,ged�dBdC„ ƒZ-ej	ejej+ej,ej.ged�dDdE„ ƒZ/e/Z0dS )Lé    Nc             C   s>   t | tƒr4t| ƒdkst‚| d jd t| d ƒ S | jS d S )Né   r   ú-é   )Ú
isinstanceÚtupleÚlenÚAssertionErrorÚ__name__Ústr)Úx© r   úD/tmp/pip-install-4cy230dp/pandas/pandas/tests/arithmetic/conftest.pyÚid_func   s    
r   ÚfooÚEgonÚVenkmanÚNCC1701D)Úparamsc             C   s   | j S )zP
    A 3-tuple of names, the first two for operands, the last for a result.
    )Úparam)Úrequestr   r   r   Únames   s    r   r   )Údtypec             C   s   | j S )aL  
    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gD ]}|d gd |d�‘qqS )r   é   )r   )ÚnpÚint64Úuint64Úfloat64)Ú.0Úbox_clsr   r   r   r   ú
<listcomp>:   s   r    c             C   s    g | ]}|dgd t jd�‘qS )g        r   )r   g       €)r   r   )r   r   r   r   r   r    ?   s    c             C   s   g | ]}t jd |d�‘qS )r   )r   )r   Úarray)r   r   r   r   r   r    A   s    g        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 = pd.RangeIndex(5)
    >>> arr / zeros
    Float64Index([nan, inf, inf, inf, inf], dtype='float64')
    )r   )r   r   r   r   ÚzeroF   s    r"   r   r   r   r   c             C   s
   t | ƒjS )N)Útyper	   )r   r   r   r   Ú<lambda>e   s    r$   )r   Úidsc             C   s   | j S )z7
    Several types of numeric-dtypes Index objects
    )r   )r   r   r   r   Únumeric_idx^   s    r&   Z5m4sc             C   s
   t | ƒjS )N)r#   r	   )r   r   r   r   r$   x   s    c             C   s   | j S )zT
    Several variants of Timedelta scalars representing 5 minutes and 4 seconds
    )r   )r   r   r   r   Ú	scalar_tdr   s    r'   é   éH   )Údaysz72:00:00ÚDÚhc             C   s
   t | ƒjS )N)r#   r	   )r   r   r   r   r$   Š   s    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    r-   r   éx   )Úhoursi  )ÚsecondsÚmc             C   s
   t | ƒjS )N)r#   r	   )r   r   r   r   r$   �   s    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    r2   é   )Ú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    r6   é   é   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    r9   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    r:   c             C   s   | j S )z‚
    Several array-like containers that should have effectively identical
    behavior with respect to arithmetic operations.
    )r   )r   r   r   r   Úboxá   s    r;   c             C   s   | j S )z]
    Fixture to test behavior for Index, Series, DataFrame, and pandas Array
    classes
    )r   )r   r   r   r   Úbox_with_arrayê   s    r<   )r   NN)r   r   N)r   r   r   g       €g       €i   )1Znumpyr   ZpytestZpandasÚpdZpandas._testingZ_testingÚtmr   Zfixturer   r!   r   r   ÚIndexÚzerosÚextendr   r   r"   ZFloat64IndexZarangeZ
Int64IndexZUInt64IndexZ
RangeIndexr&   Z	TimedeltaZto_pytimedeltaZto_timedelta64r'   ÚoffsetsZDayZHourZtimedelta64r-   ZMinuter2   Z	YearBeginZ
MonthBeginZ_common_mismatchr6   r9   r:   ZSeriesZ	DataFramer;   Zto_arrayr<   Zbox_with_array2r   r   r   r   Ú<module>   s‚   
	
$ 
	















"	&
