
    Owg                     V   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                  j                  ddg dfdg d	fgddg
      d        Zd Zd Zej                  j                  dg d      d        Zd Zy)    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     b/var/www/horilla/myenv/lib/python3.12/site-packages/pandas/tests/arrays/boolean/test_arithmetic.pydatar   
   sQ     88	uRVVH$e}r'99RVVHDe}T r   c                  T    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      s1     88TFQJ%1,vz9KKr   c                  :    t        j                  g ddz  d      S )r   )TFNr   r   r   r   r   r   r   right_arrayr      s     88'!+9==r   zopname, expadd)	TTNTFNNNNmul)	TFNFFNNNN)idsc                     t        t        |      } || |      }t        j                  |d      }t	        j
                  ||       y )Nr   r   )getattroperatorr
   r   tmassert_extension_array_equal)r   r   opnameexpopresultexpecteds          r   test_add_mulr%   #   s<     
6	"B
K(Fxx9-H##FH5r   c                 r    d}t        j                  t        |      5  | |z
   d d d        y # 1 sw Y   y xY w)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   -6c                 P   d}t        j                  t        |      5  t        j                  | j
                        t        j                  |j
                        z   d d d        t        j                  t        |      5  | |z   d d d        y # 1 sw Y   3xY w# 1 sw Y   y xY w)N-operator '.*' not implemented for bool dtypesr'   )r)   r*   NotImplementedErrorr
   Series_datar,   s      r   test_divr4   ;   s    
9C	*#	6 C
		*""#bii0A0A&BBC 
*#	6 ![ ! !	C C! !s   A BBBB%r    )floordivmodpowc                 2   t        t        |      }|dk7  r0d}t        j                  t        |      5   || |      }d d d        y  || |      } || j                  d      |j                  d            }t        j                  ||       y # 1 sw Y   y xY w)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
K0F	1
K(F*##F+[-?-?-GHH##FH5	1s   
BBc                    |r&dd l }t        |j                  j                  t        f}nt        }|}t        j                  |       }t        ||      }d}t        j                  t        |      5   |d       d d d        dj                  g d      }t        j                  ||      5   |t        j                  d             d d d        |dvr[dj                  g d	      }t        j                  ||      5   |t        j                  d|j                  
             d d d        y y # 1 sw Y   xY w# 1 sw Y   uxY w# 1 sw Y   y xY w)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   ]   s'    "&&99;NO	!B
		$A
!R.C	H  
y	, E

((	
C 
s#	& &BLL$%& 
((hh
 ]]3c* 	1		%qww/0	1 	1 ) & &	1 	1s$   /	D.*D:<(E.D7:EE)r   numpyr   r)   pandasr
   pandas._testing_testingr   fixturer   r   r   markparametrizer%   r.   r4   r;   rP   r   r   r   <module>rX      s           L L
 > > 	GH	IJ 
  66!! 	6	6 .1r   