3
pd]              	   @   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   B/tmp/pip-build-7vycvbft/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   )1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   
	
$ 
	















"	&
