
    [6g                     T   d dl Z d dlZd dlZd dlZd dlmZ ej	        d             Z
ej	        d             Zej	        d             Zej                            ddg dfdg d	fgddg
          d             Zd Zd Zej                            dg d          d             Zd ZdS )    Nc                      t          j        ddgdz  t          j        gz   ddgdz  z   t          j        gz   ddgz   d          S )>Fixture returning boolean array with valid and missing values.TF   ,   booleandtype)pdarraynpnan     j/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/pandas/tests/arrays/boolean/test_arithmetic.pydatar   
   sU     8	uRVH$e}r'99RVHDe}T   r   c                  R    t          j        dgdz  dgdz  z   dgdz  z   d          S )r   T   FNr   r   r
   r   r   r   r   
left_arrayr      s5     8TFQJ%1,vz9KKKKr   c                  8    t          j        g ddz  d          S )r   )TFNr   r   r   r   r   r   r   right_arrayr      s%     8'''!+9====r   zopname, expadd)	TTNTFNNNNmul)	TFNFFNNNN)idsc                     t          t          |          } || |          }t          j        |d          }t	          j        ||           d S )Nr   r   )getattroperatorr
   r   tmassert_extension_array_equal)r   r   opnameexpopresultexpecteds          r   test_add_mulr%   #   sQ     
6	"	"BR
K((Fx9---H#FH55555r   c                 |    d}t          j        t          |          5  | |z
   d d d            d S # 1 swxY 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   msgs      r   test_subr.   2   s    	Y  
y	,	,	, ! ![  ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !s   155c                 H   d}t          j        t          |          5  t          j        | j                  t          j        |j                  z   d d d            n# 1 swxY w Y   t          j        t          |          5  | |z   d d d            d S # 1 swxY w Y   d S )N-operator '.*' not implemented for bool dtypesr'   )r)   r*   NotImplementedErrorr
   Series_datar,   s      r   test_divr4   ;   s/   
9C	*#	6	6	6 C C
	*"##bi0A&B&BBBC C C C C C C C C C C C C C C 
*#	6	6	6 ! ![  ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !s#   4AA"%A"BBBr    )floordivmodpowc                 h   t          t          |          }|dk    rCd}t          j        t          |          5   || |          }d d d            n# 1 swxY w Y   d S  || |          } ||                     d          |                    d                    }t          j        ||           d S )Nr6   r0   r'   Int8)r   r   r)   r*   r1   astyper   r   )r   r   r    r"   r-   r#   r$   s          r   test_op_int8r;   E   s     
6	"	"B=].c::: 	1 	1R
K00F	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1R
K((Fr*##F++[-?-?-G-GHHH#FH55555s   AAAc                    |rdd l }t          |j        j        t          f}nt          }|}t          j        |           }t          ||          }d}t          j	        t          |          5   |d           d d d            n# 1 swxY w Y   d
                    g d          }t          j	        ||          5   |t          j        d                     d d d            n# 1 swxY w Y   |dvrld
                    g d	          }t          j	        ||          5   |t          j        d|j        
                     d d d            d S # 1 swxY w 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__)r?   zcan only concatenate strz4not all arguments converted during string formattingr@   znot implemented)index)pyarrowr+   libArrowNotImplementedErrorr1   r
   r2   r   r)   r*   join	TimestamprD   )	r   all_arithmetic_operatorsusing_infer_stringpaerrr"   sopsr-   s	            r   test_error_invalid_valuesrP   ]   sP     "&9;NO	!B
	$A
!R..C	H  
y	,	,	,  E


              
((	
 	
 	
 C 
s#	&	&	& & &BL$$%%%& & & & & & & & & & & & & & & 
(((hh  
 
 ]3c*** 	1 	1C	%qw///000	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 )(s6   +BB
B;C%%C),C)!%EEE)r   numpyr   r)   pandasr
   pandas._testing_testingr   fixturer   r   r   markparametrizer%   r.   r4   r;   rP   r   r   r   <module>rX      sx                      L L L
 > > > 	GGGH	IIIJ 
   6 6 6! ! !! ! !    	6 	6 	6 .1 .1 .1 .1 .1r   