o
    Û­jQ  ã                   @   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   úh/var/www/html/CropPilot/venv/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 )Nz˜numpy 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þ   |}t  | ¡}t||ƒ}d}tjt|d�� |dƒ W d   ƒ n1 s$w   Y  d g d¢¡}tjt|d�� |t  d¡ƒ W d   ƒ n1 sIw   Y  |dvr}d g d¢¡}tjt|d�� |t jd|jd	�ƒ W d   ƒ d S 1 svw   Y  d S d S )
Na  did 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''|not supported for dtyper    Úfooú|)ú!unsupported operand type\(s\) forz;Concatenation operation is not implemented for NumPy arraysúhas no kernelúnot supported for dtypeÚ20180101)Ú__mul__Ú__rmul__)r5   zcan only concatenate strz4not all arguments converted during string formattingr6   znot implementedr7   )Úindex)	r   r*   r   r"   r#   r$   ÚjoinÚ	Timestampr;   )r   Úall_arithmetic_operatorsr   ÚsÚopsr&   r   r   r   Útest_error_invalid_values]   s,   

ÿ
ÿÿÿÿ
"ÿôrA   )r   Únumpyr
   r"   Úpandasr   Úpandas._testingÚ_testingr   Úfixturer   r   r   ÚmarkÚparametrizer   r'   r,   r2   rA   r   r   r   r   Ú<module>   s6    


	

þú
	
þ
