o
    _~#g                     @   s   d dl Zd dlZd dlmZ d dlZd dlmZ	 d dl
mZ dd e	jD Zedd e	jD 7 Zejedd eD dd	d
 Ze dd Zdd Zdd Zdd ZdS )    N)is_integer_dtype)BaseMaskedArrayc                 C      g | ]}t jg d |dqS ))         Ndtypepdarray.0r	    r   /var/www/static.ux5.de/https/Moving-Object-Detection-with-OpenCV/env/lib/python3.10/site-packages/pandas/tests/arrays/masked/test_function.py
<listcomp>
   s    r   c                 C   r   ))g?5^I?gx&ѿgGz@Nr   r
   r   r   r   r   r      s    c                 C   s   g | ]}|j jqS r   )r	   name)r   ar   r   r   r      s    )paramsidsc                 C   s   | j S )zi
    Fixture returning parametrized 'data' array with different integer and
    floating point types
    )param)requestr   r   r   data   s   r   c                 C   s   t | rt}|S | jj}|S )z@
    Fixture returning numpy dtype from 'data' input array.
    )r   floatr	   type)r   numpy_dtyper   r   r   r      s
   r   c                 C   st   |   }tjt | j|d d| jd}t|| | j dd}tjtj | j|d ddd| jd}t|| d S )N)r	   na_valuer   r   )decimals)roundr   r   npto_numpyr	   tmassert_extension_array_equal)r   r   resultexpectedr   r   r   
test_round&   s   r%   c                 C   s    |   }t| }t|| d S )N)tolistlistr!   assert_equal)r   r#   r$   r   r   r   test_tolist7   s   r)   c                  C   sZ   G dd dt } | tg dtg dd}| }tdtjdg}t|| d S )Nc                   @   s    e Zd Ze ZejZejZdS )z$test_to_numpy.<locals>.MyStringArrayN)	__name__
__module____qualname__r   StringDtyper	   
_dtype_clsNA_internal_fill_valuer   r   r   r   MyStringArray@   s    
r1   )r   bc)FTF)valuesmaskr   r3   )r   r   r   r    r   r/   r!   assert_numpy_array_equal)r1   arrr#   r$   r   r   r   test_to_numpy=   s   r8   )numpyr   pytestpandas.core.dtypes.commonr   pandasr   pandas._testing_testingr!   pandas.core.arraysr   ALL_INT_EA_DTYPESarraysFLOAT_EA_DTYPESfixturer   r   r%   r)   r8   r   r   r   r   <module>   s"    

