o
    _~#g                     @   s   d dl Z d dlZd dlZd dlZd dlmZ ej	dd Z
ej	dd Zej	dd Zejjdd	g d
fdg dfgd	dgddd Zdd Zdd Zejdg ddd Zdd ZdS )    Nc                   C   s:   t jddgd tjg ddgd  tjg ddg ddS )>Fixture returning boolean array with valid and missing values.TF   ,   booleandtype)pdarraynpnan r   r   /var/www/static.ux5.de/https/Moving-Object-Detection-with-OpenCV/env/lib/python3.10/site-packages/pandas/tests/arrays/boolean/test_arithmetic.pydata
   s   .r   c                   C   s(   t jdgd dgd  dgd  ddS )r   T   FNr   r   r   r	   r   r   r   r   
left_array   s   (r   c                   C   s   t jg dd ddS )r   )TFNr   r   r   r   r   r   r   r   right_array   s   r   zopname, expadd)	TTNTFNNNNmul)	TFNFFNNNN)idsc                 C   s2   t t|}|| |}tj|dd}t|| d S )Nr   r   )getattroperatorr   r	   tmassert_extension_array_equal)r   r   opnameexpopresultexpectedr   r   r   test_add_mul#   s   
	
r   c                 C   s@   d}t jt|d | |  W d    d S 1 sw   Y  d S )Nznumpy boolean subtract, the `-` operator, is (?:deprecated|not supported), use the bitwise_xor, the `\^` operator, or the logical_xor function instead\.match)pytestraises	TypeErrorr   r   msgr   r   r   test_sub2   s
   
"r'   c                 C   s   d}t jt|d t| jt|j  W d    n1 s w   Y  t jt|d | |  W d    d S 1 s<w   Y  d S )N-operator '.*' not implemented for bool dtypesr    )r"   r#   NotImplementedErrorr   Series_datar%   r   r   r   test_div;   s   
"r,   r   )floordivmodpowc                 C   s   t t|}|dkr*d}tjt|d || |}W d    d S 1 s#w   Y  d S || |}|| d|d}t|| d S )Nr.   r(   r    Int8)r   r   r"   r#   r)   astyper   r   )r   r   r   r   r&   r   r   r   r   r   test_op_int8E   s   
	

r2   c           	      C   s  |rdd l }t|jjtf}nt}|}t| }t||}d}tj	t|d |d W d    n1 s4w   Y  d
g d}tj	||d |td W d    n1 sYw   Y  |dvrd
g d	}tj	||d |tjd|jd
 W d    d S 1 sw   Y  d S d S )Nr   zdid not contain a loop with signature matching types|BooleanArray cannot perform the operation|not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''r    foo|)!unsupported operand type\(s\) forz;Concatenation operation is not implemented for NumPy arrayshas no kernel20180101)__mul____rmul__)r5   zcan only concatenate strz4not all arguments converted during string formattingr6   znot implemented)index)pyarrowr$   libArrowNotImplementedErrorr)   r   r*   r   r"   r#   join	Timestampr:   )	r   all_arithmetic_operatorsusing_infer_stringpaerrr   sopsr&   r   r   r   test_error_invalid_values]   s4   


	"rF   )r   numpyr
   r"   pandasr   pandas._testing_testingr   fixturer   r   r   markparametrizer   r'   r,   r2   rF   r   r   r   r   <module>   s6    


	


	

