+
    xȇi-:                     l   ^ RI t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t ^ RIHt ^ RIHt ^ RIHt ]P&                  R 4       t]P&                  R 4       t]P&                  R	 4       t]P&                  R
 4       t]P&                  R 4       t]P&                  R 4       t]P&                  R 4       t]P&                  R 4       t]P&                  R 4       t]P&                  R 4       t]P&                  R 4       t]P>                  PA                  ]PB                  '       * RR7       ! R R4      4       t"R# )    N)import_optional_dependency)option_context)	DataFrame)expressions)Versionc                      \        \        P                  P                  ^4      P	                  R4      \        R4      RR7      # )   ABCDfloat64columnsdtypei'     r   nprandomdefault_rngstandard_normallist     m/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/test_expressions.py_framer      s6    
		a 00<V r   c                      \        \        P                  P                  ^4      P	                  R4      \        R4      RR7      # )r	   r
   r   r   )d   r   r   r   r   r   _frame2r      s6    
		a 00:V r   c                     \        R V R ,          RV R,          P                  R4      RV R,          P                  R4      RV R,          P                  R4      /4      # ABfloat32Cint64Dint32r   astyper   s   &r   _mixedr*   "   sY    ##I.##G,##G,		
 r   c                     \        R V R ,          RV R,          P                  R4      RV R,          P                  R4      RV R,          P                  R4      /4      # r   r'   r   s   &r   _mixed2r-   .   sY    $$Y/$$W-$$W-		
 r   c                      \        \        P                  P                  ^4      P	                  ^^dRR7      \        R4      RR7      # )r	   sizer
   r$   r   r   r   r   r   r   integersr   r   r   r   _integerr3   :   s=    
		a ))!Sz)BV r   c                     V \         P                  P                  ^4      P                  ^ ^\         P                  ! V 4      R7      ,          # )r	   r/   )r   r   r   r2   shape)r3   s   &r   _integer_integersr6   C   s9     bii++A.771288HCU7VVVr   c                      \        \        P                  P                  ^4      P	                  ^^dRR7      \        R4      RR7      # )r	   r/   r
   r$   r   )e   r   r1   r   r   r   	_integer2r9   I   s=    
		a ))!Sx)@V r   c                 0    V R ,          P                  4       # r    to_numpyr)   s   &r   _arrayr>   R       #;!!r   c                 0    V R ,          P                  4       # r;   r<   r,   s   &r   _array2rA   W       3<  ""r   c                 0    V R ,          P                  4       # r%   r<   )r*   s   &r   _array_mixedrE   \   r?   r   c                 0    V R ,          P                  4       # rD   r<   )r-   s   &r   _array_mixed2rG   a   rB   r   znot using numexpr)reasonc                     a  ] tR t^ft o ]V 3R lR l4       t]P                  P                  R. R!O4      ]P                  P                  RRR.4      ]P                  P                  R. R"O4      R 4       4       4       t	]P                  P                  R. R!O4      ]P                  P                  RRR.4      R	 4       4       t
R
 t]P                  P                  R4      ]P                  P                  R. R#O4      ]P                  P                  RR$R%.4      R 4       4       4       t]P                  P                  RR$R%.4      R 4       t]P                  P                  RRR.4      ]P                  P                  R. R&O4      R 4       4       t]P                  P                  R. R'O4      R 4       t]P                  P                  R. R(O4      R 4       t]P                  P                  R]! . R)O. R)O.. R*OR7      ]! RR.RR..RR.R7      3]! . R+O. R,O. R-O.. R*OR7      ]! RR.RR.RR..RR.R7      3.4      R 4       t]P                  P                  RR"4      ]P                  P                  RR.4      R 4       4       t]P                  P                  R. R/O4      ]P                  P                  RR0^.4      R 4       4       tRtV tR # )1TestExpressionsc                &   < V ^8  d   QhRS[ RS[/# )r	   flexopname)boolstr)format__classdict__s   "r   __annotate__TestExpressions.__annotate__i   s          s  r   c                  a V'       d   V3R  lpSVn         M\        \        S4      p\        RR4      ;_uu_ 4        V! W4      pRRR4       \        P
                  ! 4        V! W4      pVX3#   + '       g   i     L1; i)c                 (   < \        V S4      ! V4      # )N)getattr)xyrM   s   &&r   <lambda>)TestExpressions.call_op.<locals>.<lambda>k   s    ga03r   compute.use_numexprFN)__name__rV   operatorr   exprget_test_result)dfotherrL   rM   opexpectedresults   &&&f   r   call_opTestExpressions.call_oph   se    3B BK6*B1599"}H : 	Bx :9s   	A..A>	fixturerL   TFarithc           	        VP                  V4      pVP                  4       ;_uu_ 4       pVP                  \        R ^ 4       V P	                  WfW44      w  rVR8X  de   \
        ;QJ d0    R V	P                  P                   4       F  '       d   K   RM%	  RM!! R V	P                  P                   4       4      '       g   Q h\        P                  ! W4       \        \        VP                  4      4       Fx  p
V P	                  VP                  RV
3,          VP                  RV
3,          W44      w  rVR8X  d   V	P                  P                  R8X  g   Q h\        P                  ! W4       Kz  	  RRR4       R#   + '       g   i     R# ; i)_MIN_ELEMENTStruedivc              3   >   "   T F  qP                   R 8H  x  K  	  R# 5i)fN)kind).0rW   s   & r   	<genexpr>6TestExpressions.test_run_arithmetic.<locals>.<genexpr>   s     I2HQ66S=2Hs   FTNNNrm   N)getfixturevaluecontextsetattrr^   re   alldtypesvaluestmassert_equalrangelenr   ilocr   rn   )selfrequestrg   rL   rh   monkeypatchr`   mrd   rc   is   &&&&&&     r   test_run_arithmetic#TestExpressions.test_run_arithmeticx   s   " $$W-  ""aIIdOQ/#||BD@F	!sI(//2H2HIsssI(//2H2HIIIIIOOH-3rzz?+#'<<GGAqDM2771a4=$$  I%#>>..#5551 , #"""s   =E;(%E;.E;?B2E;;F	c           	        VP                  V4      pVP                  p\        RR4      ;_uu_ 4        V^,           pRRR4       VP                  4       ;_uu_ 4       p	V	P	                  \
        R^ 4       \
        P                  ! R4       V P                  VXW74      w  r\
        P                  ! 4       pV'       g   Q R4       h\        P                  ! W4       \        \        VP                  4      4       FE  pVP                  RV3,          ^,           pV P                  VP                  RV3,          WR4       KG  	  RRR4       R#   + '       g   i     EL; i  + '       g   i     R# ; i)	z
tests solely that the result is the same whether or not numexpr is
enabled.  Need to test whether the function does the correct thing
elsewhere.
r[   FNrj   Tz Did not use numexpr as expected.rr   add)rs   r\   r   rt   ru   r^   set_test_modere   r_   ry   rz   r{   r|   r   r}   )r~   r   rg   rL   comparison_opr   r`   rh   ra   r   rd   rc   used_numexprr   binary_comps   &&&&&&         r   test_run_binaryTestExpressions.test_run_binary   s   & $$W-&&1599FE :   ""aIIdOQ/t$#||BtCF//1LC!CC<OOH-3rzz?+#jjA.2RWWQT]KuE , #" :99 #""s   
E
C$E
E	E/	c                   \         P                  P                  ^4      P                  R4      p\         P                  P                  ^4      P                  ^d4      p\        P
                  ! \        P                  RWR4      pV'       d   Q h\        P
                  ! \        P                  RW"R4      pV'       d   Q h\        P
                  ! \        P                  RWR4      pV'       g   Q hR# )r	   iAB Nevaluate+)r   r   r   r   r^   _can_use_numexprr]   r   )r~   arrayarray2rd   s   &   r   test_invalidTestExpressions.test_invalid   s    		%%a(88C&&q)99#> &&x||T5Tz &&x||S&*Uz &&x||S%Tvr   z2ignore:invalid value encountered in:RuntimeWarningzopname,op_strzleft_fix,right_fixc                <   VP                  V4      pVP                  V4      pR  p\        RR4      ;_uu_ 4        V! WgW#4       RRR4       \        P                  ! ^4       V! WgW#4       \        P                  ! 4        V! WgW#4       R#   + '       g   i     LO; i)c                 4   VR 8X  d   \         P                  ! V 4      p \        \        V4      p\        P
                  ! W@V RR7      p\        P
                  ! W@V RR7      p\        P                  ! WV4       \        P                  ! WCWR4      pV'       d   Q hR# )powTuse_numexprFr   N)	r   absrV   r]   r^   r   ry   assert_numpy_array_equalr   )leftrightrM   op_strrb   rd   rc   s   &&&&   r   testit/TestExpressions.test_binary_ops.<locals>.testit   st    vvd|6*B ]]2TtDF}}RtGH''9**2uZPF:vr   r[   FNrs   r   r^   set_numexpr_threads)	r~   r   rM   r   left_fix	right_fixr   r   r   s	   &&&&&&   r   test_binary_opsTestExpressions.test_binary_ops   s     &&x0''	2	 15994/ : 	  #tF+  "tF+ :9s   
BB	c                @  aaa VP                  V4      oVP                  V4      oVVV3R  lp\        RR4      ;_uu_ 4        V! 4        RRR4       \        P                  ! ^4       V! 4        \        P                  ! 4        V! 4        R#   + '       g   i     LK; i)c                  
  < S^,           p S^,           pSp\         P                  ! VSV RR7      p\         P                  ! VSV RR7      p\        P                  ! W44       \         P                  ! W"SVR4      pV'       d   Q hR# )   Tr   Fr   N)r^   r   ry   r   r   )f12f22rb   rd   rc   r   r   r   s        r   r   3TestExpressions.test_comparison_ops.<locals>.testit   sp    (C!)CB]]2tSdCF}}RsFH''9**25#zJF:vr   r[   FNr   )r~   r   r   r   r   r   r   r   s   &&f&& @@r   test_comparison_ops#TestExpressions.test_comparison_ops   ss     &&x0''	2	 1599H : 	  #  " :9s   BB	condc                  aa VP                  V4      oVV3R  lp\        RR4      ;_uu_ 4        V! 4        RRR4       \        P                  ! ^4       V! 4        \        P                  ! 4        V! 4        R#   + '       g   i     LK; i)c                    < \         P                  ! SP                  \         P                  R 7      p V P	                  S4       \
        P                  ! V SP                  SP                  ^,           4      p\         P                  ! V SP                  SP                  ^,           4      p\        P                  ! W4       R# ))r   N)
r   emptyr5   bool_fillr^   whererx   ry   r   )crd   rc   r   r`   s      r   r   *TestExpressions.test_where.<locals>.testit  sp    2AFF4LZZ299bii!m<Fxx299bii!m<H''9r   r[   FNr   )r~   r   r   rg   r   r`   s   &&f& @r   
test_whereTestExpressions.test_where  sc     $$W-	: 1599H : 	  #  " :9s   A::B
	zop_str,opnamec                   \        R \        P                  P                  ^4      P                  ^
4      R8  R\        P                  P                  ^4      P                  ^
4      R8  /4      pRV R2p\	        \
        V4      p\        P                  ! V4      p\        P                  ! \        VR7      ;_uu_ 4        V! W34       RRR4       \        P                  ! \        VR7      ;_uu_ 4        V! VP                  VP                  4       RRR4       \        P                  ! \        VR7      ;_uu_ 4        V! VP                  R4       RRR4       \        P                  ! \        VR7      ;_uu_ 4        V! RVP                  4       RRR4       \        P                  ! \        VR7      ;_uu_ 4        V! RV4       RRR4       \        P                  ! \        VR7      ;_uu_ 4        V! VR4       RRR4       R#   + '       g   i     ELI; i  + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)	a      ?bz
operator 'z!' not implemented for bool dtypesmatchNTF)r   r   r   r   rV   r]   reescapepytestraisesNotImplementedErrorr   r   )r~   r   rM   r`   msgrm   err_msgs   &&&    r   !test_bool_ops_raise_on_arithmetic1TestExpressions.test_bool_ops_raise_on_arithmetic"  s    RYY**1-44R83>RYY**1-44R83>
 6("CDHf%))C.]].g>>bI ? ]].g>>bddBDDM ? ]].g>>bddDM ? ]].g>>eRTTN ? ]].g>>eRL ? ]].g>>b$K ?> ?>> ?>> ?> ?> ?> ?>>sH   >	H3H=H/=I=
I3
I(H	H,	/H?	I	I%	(I9	c                @   ^
p\        R\        P                  P                  ^4      P                  V4      R8  R\        P                  P                  ^4      P                  V4      R8  /4      pRRRRRR	/pRR
RRR	R/p\	        \
        V4      p\	        \
        WvV,          ,          4      p	VR8X  d   R# Rp
\        RRR7      pV'       d1   VR9   d*   \        VP                  4      \        R4      8  d   \        MRpVP                  4       ;_uu_ 4       pVP                  \        R^4       \        RR4      ;_uu_ 4        \        P                  ! WR7      ;_uu_ 4        V! WU4      pV	! WU4      p\        P                   ! W4       RRR4       \        P                  ! WR7      ;_uu_ 4        V! VP"                  VP$                  4      pV	! VP"                  VP$                  4      p\        P&                  ! W4       RRR4       \        P                  ! WR7      ;_uu_ 4        V! VP"                  R4      pV	! VP"                  R4      p\        P&                  ! W4       RRR4       \        P                  ! WR7      ;_uu_ 4        V! RVP"                  4      pV	! RVP"                  4      p\        P&                  ! W4       RRR4       \        P                  ! WR7      ;_uu_ 4        V! RV4      pV	! RV4      p\        P                   ! W4       RRR4       \        P                  ! WR7      ;_uu_ 4        V! VR4      pV	! VR4      p\        P                   ! W4       RRR4       RRR4       RRR4       R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELO; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)
   r   r   r   r   |*&-^or_and_xorNz$operator is not supported by numexprnumexprignore)errorsz2.13.1rj   r[   Tr   F>   r   r   )r   r   r   r   rV   r]   r   r   __version__UserWarningrt   ru   r^   r   ry   assert_produces_warningassert_frame_equalr   r   assert_series_equal)r~   r   rM   r   nr`   subs	sub_funcsrm   fer   newarningr   res   &&&&            r    test_bool_ops_warn_on_arithmetic0TestExpressions.test_bool_ops_warn_on_arithmeticC  s    RYY**1-44Q7#=RYY**1-44Q7#=
 S#sC-%fc59	Hf%Xyf67S=4'	(C *$''(*;;   	   ""aIIdOQ/ 5t<<//CC"	A2
A))!/ D
 //CC"$$A244A**10 D
 //CC"$$A244A**10 D
 //CC%A5"$$A**10 D
 //CC%A5"A))!/ D
 //CC"dA2tA))!/ D5 = #" DCC
 DCC
 DCC
 DC
 DC
 DC5 =< #""s   ,P O9	#'N
'O9	1AN'O9	)=N,&'O9	=O 
'O9	1)O'O9	)O&*O9	2PN	O9	N)#	O9	,N=7	O9	 OO9	O#O9	&O61O9	9P	PP	ztest_input,expectedr   r   )r   c                    VP                   R RR.3,          P                  VP                   R RR.3,          4      p\        P                  ! W24       R# )rr   r   r   N)locr   ry   r   )r~   
test_inputrc   rd   s   &&& r   test_bool_ops_column_name_dtype/TestExpressions.test_bool_ops_column_name_dtype  sF    . C> 1255jnnQgEV6WX
f/r   axisc           	        TpV^8X  d   VP                   R,          pMVP                   R,          pVP                  4       ;_uu_ 4       pVP                  \        R^ 4       \	        WR4      p\        RR4      ;_uu_ 4        V! WaR7      p	RRR4       V! WaR7      p
\        P                  ! X	V
4       RRR4       R#   + '       g   i     L:; i  + '       g   i     R# ; i)r   rj   r[   F)r   N)r   rr   )rr   r   )r}   rt   ru   r^   rV   r   ry   r   )r~   r   rh   r   r   r`   ra   r   op_funcrc   rd   s   &&&&&      r   test_frame_series_axis&TestExpressions.test_frame_series_axis  s     19GGDMEGGDME  ""aIIdOQ/b(G 5u=="54 > U.F!!(F3 #"
 >= #""s$   	7C 
B<	
(C<CCC 	rb   scalarc           	        VP                  4       ;_uu_ 4       pVP                  \        R ^ 4       \        P                  ! R^24      pV! V4      p\        Wq4      pV! V4      p	\        RR4      ;_uu_ 4        V! V4      p
RRR4       \        P                  ! V	X
4       \        V4       FR  w  rV\        8X  d   V	P                  V^ 3,          pMW,          p \        \        V4      V4      ! V4      p
W8X  g   Q hKT  	  RRR4       R#   + '       g   i     L; i  \         d     K  i ; i  + '       g   i     R# ; i)rj   r[   FNi)rt   ru   r^   r   arangerV   r   ry   rz   	enumerater   r}   intZeroDivisionError)r~   rb   box_with_arrayr   r   r   dataobjmethodrd   rc   r   elemscalar_results   &&&&&         r   ,test_python_semantics_with_numexpr_installed<TestExpressions.test_python_semantics_with_numexpr_installed  s      ""aIIdOQ/99S"%D &CS%FF^F   5u==!&> > OOFH- %T?!Y.$*KK1$5M$*IM5&s4y"5f=H )444 + #" >= ) + #""sI   AD/7	D
	 AD/D4D/
DD/D,	(D/+D,	,D//E 	r   N)r3   r9   r6   r   r   r*   r-   )r   submulmodrk   floordiv))r   r   )r   r   )r   r   )rk   /)r   **)r>   rA   )rE   rG   )r   r   r*   r-   ))r  rk   )z//r   )r  r   ))r   r   )r   r   )r   r   )r   r   r	   aa)r   r   r   r   )r      r	   r  )r   r   r	   r  )r   r   r   bb)r   r   )__mod____rmod____floordiv____rfloordiv__)r\   
__module____qualname____firstlineno__staticmethodre   r   markparametrizer   r   r   filterwarningsr   r   r   r   r   r   r   r   r   __static_attributes____classdictcell__)rQ   s   @r   rJ   rJ   f   s/        [[	
 [[VdE]3[[D2 4 2$ [[	
 [[VdE]3F 4F2  [[ TU[[S [[46WX,	 V,4 [[46WX2 [[VdE]3[[Y(RS T 4$ [[N< [[C;0;0z [[ $o6@X E5>E5>:S'NS	 $oG4 U^eU^eU^D 'N		
*0+*0
 [[D [[VV,4 -4( [[	
 [[XAw/5 05r   rJ   )#r]   r   numpyr   r   pandas.compat._optionalr   pandasr   pandas._testing_testingry   pandas.core.apir   pandas.core.computationr   r^   pandas.util.versionr   rg   r   r   r*   r-   r3   r6   r9   r>   rA   rE   rG   r  skipifUSE_NUMEXPRrJ   r   r   r   <module>r     sh    	   > !  % 7 '           W W
   " " # # " " # # (((1DEt5 t5 Ft5r   