o
    _~#g2                     @   s@   d dl Zd dlZd dlmZmZ d dlmZ dd Z	dd Z
dS )    N)	DataFrameIndexc                  C   s   t jd} tg d| d| dd}dd }dd }|d	||}td
dgdd	d}tj	ddgd|d}t
|| d S )N   )foobarr   r   r   r   r   r      )ABCc                 S   s   | j  | j   S N)r	   maxr
   min)dfgb r   /var/www/static.ux5.de/https/Moving-Object-Detection-with-OpenCV/env/lib/python3.10/site-packages/pandas/tests/groupby/test_pipe.pyf      ztest_pipe.<locals>.fc                 S   s   | d S )Nr   r   )srsr   r   r   square   s   ztest_pipe.<locals>.squarer   r   r   object)dtypenameg8t@gt@r	   )r   index)nprandomdefault_rngr   standard_normalgroupbypiper   pdSeriestmassert_series_equal)random_statedfr   r   resultr   expectedr   r   r   	test_pipe   s   r'   c                  C   s   t g dg dg dd} dd }dd }d	d
 }| d|d|d|d}tddgdd}tjddg|d}t|| tg d}||dd }tjg dtg dtj	dd}t|| d S )N)r   r   r	   r	   r
   )g      ?       @g      @r(   g      @)g      $@g      Y@g     @@g      Yg     @)groupxyc                    s    | j  fdddd}|dS )Nc                    s   | j   kS r   )r+   meangrparg1r   r   <lambda>9   s    z+test_pipe_args.<locals>.f.<locals>.<lambda>F)dropnar)   )filterr   )r   r0   filteredr   r/   r   r   8   s   
ztest_pipe_args.<locals>.fc                 S   s   |   |      | S r   )sum)r   arg2r   r   r   g<   r   ztest_pipe_args.<locals>.gc                 S   s   | j | j | S r   )r*   r+   )r$   arg3r   r   r   h?   s   ztest_pipe_args.<locals>.hr)   r   
   d   r   r	   )r   g#SgbeS)r   )   r<   r   r      r=   c                 S   s   |   |   S r   )r5   countr-   r   r   r   r1   L   s    z test_pipe_args.<locals>.<lambda>)   r      )r<   r   r=   )r   )
r   r   r   r   r   r    r!   r"   r   int64)r$   r   r7   r9   r%   r   r&   serr   r   r   test_pipe_args,   s"   " rC   )numpyr   pandasr   r   r   pandas._testing_testingr!   r'   rC   r   r   r   r   <module>   s    !