o
    _~#g	                     @   s@   d dl Zd dlZd dlZd dlmZ dd Zdd Z	dd Z
dS )    Nc                 C   sf   g d}|  |}| | }||sJ d}tjt|d | j W d    d S 1 s,w   Y  d S )N)      r      z+'MultiIndex' object has no attribute 'freq'match)takeequalspytestraisesAttributeErrorfreq)idxindexerresultexpectedmsg r   /var/www/static.ux5.de/https/Moving-Object-Detection-with-OpenCV/env/lib/python3.10/site-packages/pandas/tests/indexes/multi/test_take.py	test_take   s   
"r   c                 C   s   ddg}d}t jt|d | j|dd W d    n1 sw   Y  d}t jt|d | j||d W d    n1 s?w   Y  d}t jt|d | j|d	d
 W d    d S 1 s`w   Y  d S )N   r   z1take\(\) got an unexpected keyword argument 'foo'r   )fooz$the 'out' parameter is not supported)outz%the 'mode' parameter is not supportedclip)mode)r	   r
   	TypeErrorr   
ValueError)r   indicesr   r   r   r   test_take_invalid_kwargs   s   "r   c                  C   s*  ddgt dt dgg} t jj| ddgd}|tg d}dt dfdt dfdt dfg}t jj|ddgd}t	|| |jtg dd	d
}dt dfdt dftj
t jfg}t jj|ddgd}t	|| |jtg ddd	d}dt dfdt dfdt dfg}t jj|ddgd}t	|| d}tjt|d |jtg dd	d
 W d    n1 sw   Y  tjt|d |jtg dd	d
 W d    n1 sw   Y  d}tjt|d |tddg W d    d S 1 sw   Y  d S )NABz
2011-01-01z
2011-01-02strdt)names)r   r   T)
fill_valueF)
allow_fillr$   zJWhen allow_fill=True and fill_value is not None, all indices must be >= -1r   )r   r   )r   r   z3index -5 is out of bounds for( axis 0 with)? size 4r   r'   )pd	Timestamp
MultiIndexfrom_productr   nparrayfrom_tuplestmassert_index_equalnanNaTr	   r
   r   
IndexError)valsr   r   exp_valsr   r   r   r   r   test_take_fill_value$   sD   
$r6   )numpyr,   r	   pandasr(   pandas._testing_testingr/   r   r   r6   r   r   r   r   <module>   s    