
    Mh                     P   S SK r S SKrS SKrS SKrS SKJr  \R                  S 5       r
\R                  S 5       r\R                  S 5       r\R                  R                  SS/ SQ4S/ S	Q4/SS/S
9S 5       rS rS r\R                  R                  S/ SQ5      S 5       rS rg)    Nc                      [         R                  " SS/S-  [        R                  /-   SS/S-  -   [        R                  /-   SS/-   SS9$ )>Fixture returning boolean array with valid and missing values.TF   ,   booleandtype)pdarraynpnan     ]/var/www/html/env/lib/python3.13/site-packages/pandas/tests/arrays/boolean/test_arithmetic.pydatar   
   sQ     88	uRVVH$e}r'99RVVHDe}T r   c                  P    [         R                  " S/S-  S/S-  -   S/S-  -   SS9$ )r   T   FNr   r   r
   r   r   r   r   
left_arrayr      s1     88TFQJ%1,vz9KKr   c                  6    [         R                  " / SQS-  SS9$ )r   )TFNr   r   r   r   r   r   r   right_arrayr      s     88'!+9==r   zopname, expadd)	TTNTFNNNNmul)	TFNFFNNNN)idsc                     [        [        U5      nU" X5      n[        R                  " USS9n[        R
                  " XV5        g )Nr   r   )getattroperatorr
   r   tmassert_extension_array_equal)r   r   opnameexpopresultexpecteds          r   test_add_mulr%   #   s8     
6	"B
(Fxx9-H##F5r   c                 v    Sn[         R                  " [        US9   X-
    S S S 5        g ! , (       d  f       g = f)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   *
8c                 ^   Sn[         R                  " [        US9   [        R                  " U R
                  5      [        R                  " UR
                  5      -    S S S 5        [         R                  " [        US9   X-    S S S 5        g ! , (       d  f       N5= f! , (       d  f       g = f)N-operator '.*' not implemented for bool dtypesr'   )r)   r*   NotImplementedErrorr
   Series_datar,   s      r   test_divr4   ;   sr    
9C	*#	6
		*""#bii0A0A&BB 
7 
*#	6  
7	6	 
7	6 
7	6s   AB?B
B
B,r    )floordivmodpowc                 6   [        [        U5      nUS:w  a-  Sn[        R                  " [        US9   U" X5      nS S S 5        g U" X5      nU" U R                  S5      UR                  S5      5      n[        R                  " XV5        g ! , (       d  f       g = f)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:
0F ;
(F*##F+[-?-?-GHH##F5 ;:s   	B


Bc                    U(       a&  SS K n[        UR                  R                  [        4nO[        nUn[
        R                  " U 5      n[        Xe5      nSn[        R                  " [        US9   U" S5        S S S 5        SR                  / SQ5      n[        R                  " XHS9   U" [
        R                  " S5      5        S S S 5        US;  aV  SR                  / S	Q5      n[        R                  " XHS9   U" [
        R                  " SUR                  S
95        S S S 5        g g ! , (       d  f       N= f! , (       d  f       N|= f! , (       d  f       g = f)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
!.C	H  
y	,E
 
-
((	
C 
s	&BLL$% 
' 
((hh
 ]]3*		%qww/0 +* ) 
-	, 
'	& +*s$   2	D,*D=<&E,
D:=
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   