+
    xȇid                     a  0 t $ ^ RIHt ^ RIHt ^ RIHt ^ RIt^ RIt	^ RI
t
^ RIHt ^ RIHt ^ RIHtHtHt ^ RIHu Ht ^ RIHtHtHtHt ^ RIt^ R	IHtHtH t H!t!H"t"H#t# ^ RI$H%t& ^ R
I'H(t(H)t) ^ RI*H+t+ ^ RI,H-t-H.t.H/t/ ^ RI0H1t1H2t2 ^ RI3H4t4H5t5H6t6H7t7 ^ RI8H9t9 ^ RI:H;t; ]! RRR7      t<]
Pz                  ! R ]+ 4       R7      R 4       t>]
Pz                  ! ](P~                  R7      R 4       t@R tA]
Pz                  ! ]B! ]C! ^4      4      . RSOR7      R 4       tD]DtE]DtF]
Pz                  R 4       tG ! R R4      tH ! R R4      tIR  tJ ! R! R"4      tK ! R# R$4      tL ! R% R&4      tM]	P                  P                  ^4      P                  ^
4      tQ ! R' R(4      tR]P                  ! R4      R) 4       tT]P                  ! R4      ]
P                  P                  RTRU4      R+ 4       4       tW]P                  ! R4      R, 4       tX]P                  ! R4      R- 4       tYR*]/R.])P                  R/]./t[R0]\R1&   ]
P                  P                  R2]+4      ]
P                  P                  R3][4      R4 4       4       t]R5 t^R6 t_]
P                  P                  R7. RVO4      R8 4       t`R9 taR: tbR; tcR< td]
P                  P                  R=RW4      ]
P                  P                  R>]e]f34      ]
P                  P                  R?]e]f34      R@ 4       4       4       tg]
P                  P                  RARBRC.4      RD 4       thRE ti]
P                  P                  RFRGRH.4      RI 4       tjRJ tk]
P                  P                  RF]9P                  ! 4       4      RK 4       tmRL tn]
P                  P                  RM^RN. RXORO.4      RP 4       to]P                  ! R4      RQ 4       tpRR tqR# )Y    )annotations)reduce)productN)PY312)import_optional_dependency)NumExprClobberingErrorPerformanceWarningUndefinedVariableError)is_boolis_floatis_list_like	is_scalar)	DataFrameIndexSeries
date_rangeperiod_rangetimedelta_range)exprpytables)ENGINES)BaseExprVisitorPandasExprVisitorPythonExprVisitor)NUMEXPR_INSTALLEDUSE_NUMEXPR)ARITH_OPS_SYMS_binary_math_ops_binary_ops_dict_unary_math_ops)DEFAULT_GLOBALS)Versionnumexprignore)errorsc              #    "   T Fv  p\         P                  ! T\         P                  P                  VR 8H  ;'       d    \        '       * R\         R\
         2R7      \        P                  ! R 4      .R7      x  Kx  	  R# 5i)r#   znumexpr enabled->z, installed->reasonmarksN)pytestparammarkskipifr   r   td
skip_if_no).0engines   & r/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/computation/test_eval.py	<genexpr>r4   ?   s       F 	""i';;O.{m <""3!46 # 
 i(
	
 
	
 s   :B AB )paramsc                    V P                   # Nr,   requests   &r3   r2   r2   >   s    " ==    c                    V P                   # r7   r8   r9   s   &r3   parserr=   R   s    ==r;   c                
   \         V,          p\        V,          P                  '       d
    V! W4      # V! W4      #   \         d<   p\	        T4      P                  R 4      '       d   \        P                  u Rp?# h Rp?ii ; i)z6negative number cannot be raised to a fractional powerN)r   r   has_neg_frac
ValueErrorstr
startswithnpnan)lhscmp1rhsr2   ces   &&&&  r3   _eval_single_binrJ   W   sq    Av###	S; S;  	1v  H  vv	s!   < B/A=6B<A==B)r5   idsc                X   \         P                  P                  ^4      pV P                  ^ 8X  d   \	        VP                  R4      4      # V P                  ^8X  d   \        VP                  ^4      4      # V P                  ^8X  d-   \        ^^\         P                  \         P                  ^.4      # V P                  ^8X  d2   \	        VP                  R4      4      p\         P                  W"R8  &   V# V P                  ^8X  d   VP                  4       # \        V P                   4      h)         ?)
      )	rC   randomdefault_rngr,   r   standard_normalr   rD   r@   )r:   rngnan_df1s   &  r3   rE   rE   f   s    
 ))


"C}},,W566	!	c))!,--	!	q!RVVRVVQ/00	!	C//89!##	!	""$$GMM?,,r;   c                 *    R R RR RR RR RR	 R
R /# )ic                `    \        \        P                  ! V 4      \        P                  R 7      # dtype)r   rC   arangeint64ns   &r3   <lambda>idx_func_dict.<locals>.<lambda>   s    uRYYq\:r;   fc                `    \        \        P                  ! V 4      \        P                  R 7      # rY   )r   rC   r\   float64r^   s   &r3   r`   ra      s    uRYYq\<r;   sc           
     ~    \        \        ^a^aV ,           4       Uu. uF  q R\        V4       2NK  	  up4      # u upi )a   _)r   rangechr)r_   rW   s   & r3   r`   ra      s4    uuRa7HI7H!1SVHo7HIJIs   :dtc                    \        R V R7      # )
2020-01-01periods)r   r^   s   &r3   r`   ra      s    
<;r;   r/   c                    \        R V R7      # )z1 dayrn   )r   r^   s   &r3   r`   ra      s    ;r;   pc                    \        R V RR7      # )rm   D)ro   freq)r   r^   s   &r3   r`   ra      s    |L!#Fr;    ru   r;   r3   idx_func_dictrv      s2     	:<J;;F r;   c            
      *   ] tR t^t]P
                  P                  R. R1O. R2OR7      ]P
                  P                  RRR.RR.R7      ]P
                  P                  R]P                  4      R	 4       4       4       t	]P
                  P                  R
]P                  4      R 4       t]P
                  P                  R]P                  4      R 4       t]P
                  P                  RRR.4      ]P
                  P                  RRR.4      R 4       4       t]P
                  P                  R]! ]! ]4      P#                  0 R3m4      4      4      R 4       tR tR t]P,                  R 4       tR tR tR tR tR t]P
                  P                  R]P<                  P?                  ^4      PA                  R44      ]P<                  P?                  ^4      PC                  ^R4R7      ]PD                  ! . R5O]PF                  R7      .4      R 4       t$]P
                  P                  R]P<                  P?                  ^4      PA                  ^4      ]P<                  P?                  ^4      PC                  ^^R7      ]PD                  ! . R5O]PF                  R7      .4      R 4       t%R t&R t']P
                  P                  R R!R".4      R# 4       t(R$ t)]P
                  P                  R%R64      R& 4       t*R' t+R( t,R) t-R* t.R+ t/R, t0R- t1R. t2R/t3R0# )7TestEvalrF   <>ltgt)rK   cmp2binopc                	   VR 8X  d]   VR	9   dV   RpRV RV RV R2p	\         P                  ! \        VR7      ;_uu_ 4        \        P                  ! WVR7       RRR4       R# \        WAWV4      p
\        WBWV4      p\        WW4      pRV RV RV R2p	\        P                  ! WVR7      p\        P                  ! W4       R#   + '       g   i     R# ; i)
python"'BoolOp' nodes are not implemented(lhs z rhs) z (lhs  rhs)matchr2   r=   Nandor)r+   raisesNotImplementedErrorpdevalrJ   tmassert_equal)selfrF   r}   r~   rE   rG   r2   r=   msgexlhs_newrhs_newexpectedresults   &&&&&&&&      r3   test_complex_cmp_opsTestEval.test_complex_cmp_ops   s     X%="86CfUG6$u=B2#>>&9 ?"3c:"3c:#GGDTF&vdV596:
) ?>s   CC	cmp_opc                	   V^ 8  pV^ 8  pVR8X  dW   VR9   dP   RpRV R2p\         P                  ! \        VR7      ;_uu_ 4        \        P                  ! WtVR7       RRR4       R# RV R2pRP                  R	R
.4      pVR9   d_   \        V4      '       gN   \         P                  ! \        VR7      ;_uu_ 4        \        P                  ! VVVRVRV/R7       RRR4       R# \        W!W44      p\        P                  ! WtVR7      p	\        P                  ! W4       R#   + '       g   i     R# ; i  + '       g   i     R# ; i)r   r   &'(In|NotIn)' nodes are not implementedlhs  rhsr   r   N|zvonly list-like( or dict-like)? objects are allowed to be passed to (DataFrame\.)?isin\(\), you passed a (`|')bool(`|')z'argument of type 'bool' is not iterablerE   rG   r2   r=   
local_dictinnot in)r+   r   r   r   r   joinr   	TypeErrorrJ   r   r   )
r   r   rE   rG   r2   r=   r   r   r   r   s
   &&&&&&    r3   test_simple_cmp_opsTestEval.test_simple_cmp_ops   s   AgAgX&,<"<:Cxt$B2#>>&9 ?F84 hh" :	
 %%l3.?.?y44!! %sE37	 54 (SAHWWRv>FOOF-1 ?> 544s   D"=D6"D3	6E	opc                	   VR 8X  dW   VR9   dP   RpRV R2p\         P                  ! \        VR7      ;_uu_ 4        \        P                  ! WVR7       RRR4       R# \        V4      '       dX   \        V4      '       gG   VR9   d@   VR 8X  d9   VR	8X  d2   \         P                  P                  R
R7      p	VP                  V	4       RR.p
RV R2pRP                  RR.4      p\        V4      '       dT   W9   dN   \         P                  ! \        VR7      ;_uu_ 4        \        P                  ! VVVRVRV/R7       RRR4       R# \        V4      '       d   \        V4      '       d   R W#3 4       w  r#\        W!W54      p\        V4      '       d	   V'       * pMV( p\        P                  ! WVR7      p\        P                  ! W4       R#   + '       g   i     R# ; i  + '       g   i     R# ; i)r   r   r   r   z~(lhs r   r   r   Npandasz]Looks like expected is negative, unclear whether expected is incorrect or result is incorrectr'   r   zwonly list-like( or dict-like)? objects are allowed to be passed to (DataFrame\.)?isin\(\), you passed a (`|')float(`|')z(argument of type 'float' is not iterablerE   rG   r   c              3  P   "   T F  p\         P                  ! V.4      x  K  	  R # 5ir7   )rC   arrayr1   xs   & r3   r4   3TestEval.test_compound_invert_op.<locals>.<genexpr>   s     >:aBHHaSMM:s   $&r   )r+   r   r   r   r   r   r-   xfailapplymarkerr   r   r   rJ   r   assert_almost_equal)r   r   rE   rG   r:   r2   r=   r   r   r-   
skip_theser   r   s   &&&&&&&      r3   test_compound_invert_op TestEval.test_compound_invert_op   s   X"(8"8:C"U#B2#>>&9 ? SMMSMM&&("(";;$$? % D %H%
bThh# ;	
 S>>b.y44!! %sE37	 54 ~~)C..>C:>'=H""'<$9WWRv>F""84[ ?>4 544s   GG!G	!G2	c                	   TpVR 8X  dS   RV RV R2p	Rp
\         P                  ! \        V
R7      ;_uu_ 4        \        P                  ! WVR7       RRR4       R# \        W1W4      p\        WWV4      pVek   Vee   RV RV R2p	RV RV R2pR	V R
V R2p\        VRW4      pWV3 F2  p\        P                  ! VWgR7      p\        P                  ! VV4       K4  	  R# R# R#   + '       g   i     R# ; i)r   r    mid r   r   r   r   N mid and mid r    mid) & (mid r   &)r+   r   r   r   r   rJ   r   r   )r   rF   r}   rE   midhsrG   r2   r=   midex1r   r   r   ex2ex3r   r   r   s   &&&&&&&&          r3   test_chained_cmp_opTestEval.test_chained_cmp_op   s    XeD6.C6C2#>>6: ?"3c:"3c:7#6eD6.CmD66C$}TF%8C'gFHoFB&&vx8 & $7 ?>s   C$$C5	arith1c                	   R V R2p\         P                  ! WdVR7      p\        W!W44      p\        P                  ! Wx4       R V RV R2p\         P                  ! WdVR7      p\        W!W44      p	 V	P                  V4      w  rVR8X  d=   ^ RIpVP                  RV R24      p\        P                  ! VP                  V4       R# \        RV R24      p\        P                  ! Wx4       R#   \        \        \        3 d     R# i ; i)r   r   r   z rhs r#   Nznlhs z ghs)r   r   rJ   r   r   alignr#   evaluatevaluesr@   r   AttributeError)r   r   rE   rG   r2   r=   r   r   r   nlhsghsnes   &&&&&&      r3   test_binary_arith_opsTestEval.test_binary_arith_ops  s     F84 6:#C=
v0F85-6:S9	9

3ID "$ ;;vhd';<
 &&v}}h?%xt 45&&v8# I~6 	 	s   /C, C, ,DDc                	   R p\         P                  ! WSVR7      pW,          p\        P                  ! Wg4       VR8X  d{   ^ RIpVP                  R4      p\        V\        \        34      '       d$   \        P                  ! VP                  V4       R# \        P                  ! WgP                  4       4       R# \        VRW#4      p\        P                  ! Wg4       R# )z	lhs % rhsr   r#   Nzexpected % rhs%)r   r   r   r   r#   r   
isinstancer   r   r   itemrJ   )	r   rE   rG   r2   r=   r   r   r   r   s	   &&&&&    r3   test_modulusTestEval.test_modulus6  s    6:9
v0Y {{#45H&9f"566&&v}}h?&&v}}?'#sCH""64r;   c           	     	   R pVR8X  g/   VR8X  d`   \        \        P                  4      \        R4      8  d9   \        P                  ! WSVR7      pW,          p\
        P                  ! Wg4       R
# Rp\        P                  ! \        VR7      ;_uu_ 4        \        P                  ! VRVRV/VVR	7       R
R
R
4       R
#   + '       g   i     R
# ; i)z
lhs // rhsr   r#   2.13.0r   zGunsupported operand type\(s\) for //: 'VariableNode' and 'VariableNode'r   rE   rG   r   r2   r=   N)
r"   r#   __version__r   r   r   r   r+   r   r   )	r   rE   rG   r2   r=   r   resr   r   s	   &&&&&    r3   test_floor_divisionTestEval.test_floor_divisionH  s    XiGG,?,?$@GHDU$U''"F;CzHOOC*!  y44 %sE37!!	 5444s   B??C	c                	   R p\        VRW#4      p\        P                  ! WSVR7      p\        V4      '       d   \        V4      '       d   \	        V\
        \        P                  34      '       dd   \        P                  ! V4      '       dH   Rp\        P                  ! \        VR7      ;_uu_ 4        \        P                  ! Wv4       RRR4       R# \        P                  ! Wv4       Rp\        P                  ! WSVR7      p\        VRW#4      p	\        V	RW#4      p\        P                  ! Wv4       R#   + '       g   i     R# ; i)z
lhs ** rhs**r   z-(DataFrame.columns|numpy array) are differentr   Nz(lhs ** rhs) ** rhs)rJ   r   r   r   r   complexrC   complexfloatingisnanr+   r   AssertionErrorr   assert_numpy_array_equalr   )
r   rE   rG   r2   r=   r   r   r   r   middles
   &&&&&     r3   test_powTestEval.test_pow^  s     #Cs;6: cNN#8gr/A/A%BCC  AC~S99++F= :9 ""64&BWWRv>F%c4=F'cBH""64 :99s   2D55E	c                	     VP                  \        4      pV( p\
        P                  ! R W#R7      p\        P                  ! WV4       R#   \         d$    \        P                  ! \        T4      .4      p L`i ; i)z~elbr   N)	astypeboolr   rC   r   r   r   r   r   )r   rE   r2   r=   elbr   r   s   &&&&   r3   test_check_single_invert_op$TestEval.test_check_single_invert_opx  sa    	(**T"C 4>
x0	  	(((DI;'C	(s   A
 
+A87A8c                	   R p\        \        P                  P                  ^4      P	                  R4      4      pVR8X  dI   Rp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! W1VR7       RRR4       MGRp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! W1VR7       RRR4       \        \        P                  P                  ^4      P                  ^RR7      4      pVR8X  dp   \        \        P                  4      \        R4      8  dI   R	p\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! W1VR7       RRR4       M1V( p\        P                  ! W1VR7      p\        P                   ! Wg4       \        \        P                  P                  ^4      P	                  R4      R
8  4      pV( p\        P                  ! W1VR7      p\        P                   ! Wg4       \        R. ROR\        P                  P                  ^4      P	                  ^4      R
8  /4      pVR8X  dH   \
        P                  ! \"        RR7      ;_uu_ 4        \        P                  ! W1VR7       RRR4       R# Rp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! W1VR7       RRR4       R#   + '       g   i     EL3; i  + '       g   i     ELG; i  + '       g   i     EL{; i  + '       g   i     R# ; i  + '       g   i     R# ; i)~lhsr#   -couldn't find matching opcode for 'invert_dd'r   r   N0ufunc 'invert' not supported for the input typessizer   )couldn't find matching opcode for 'invertrN   brH   unknown type object#bad operand type for unary ~: 'str'rP   rM   a   g       @)r   rC   rQ   rR   rS   r+   r   r   r   r   r   integersr"   r#   r   r   assert_frame_equalr@   )r   r2   r=   r   rE   r   expectr   s   &&&     r3   test_frame_invertTestEval.test_frame_invert  sS   
 		--a0@@HIYAC2#>>F; ?> ECy44F; 5 		--a099!&9IJY77+>+>#?'(BS#S=C2#>>F; ?> TFWWT@F!!&1 		--a0@@H3NOV<
f- -bii&;&;A&>&N&Nq&QTW&WX
 Yz1FGGF; HG 8Cy44F; 54C ?>> 544 ?>>$ HGG 544s<   'K2/LLL.M2L	L	L+	.L?	M	c                	F   R p\        \        P                  P                  ^4      P	                  ^4      4      pVR8X  dI   Rp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! W1VR7      pRRR4       MGRp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! W1VR7       RRR4       \        \        P                  P                  ^4      P                  ^^R7      4      pVR8X  dp   \        \        P                  4      \        R4      8  dI   R	p\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! W1VR7       RRR4       M1V( p\        P                  ! W1VR7      p\        P                   ! Wv4       \        \        P                  P                  ^4      P	                  ^4      R
8  4      pV( p\        P                  ! W1VR7      p\        P                   ! Wv4       \        . RO4      pVR8X  dH   \
        P                  ! \"        RR7      ;_uu_ 4        \        P                  ! W1VR7       RRR4       R# Rp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! W1VR7       RRR4       R#   + '       g   i     EL ; i  + '       g   i     EL; i  + '       g   i     ELH; i  + '       g   i     R# ; i  + '       g   i     R# ; i)r   r#   r   r   r   Nr   r   r   r   rN   r   r   r   )r   rC   rQ   rR   rS   r+   r   r   r   r   r   r   r"   r#   r   r   assert_series_equalr@   )r   r2   r=   r   rE   r   r   r   s   &&&     r3   test_series_invertTestEval.test_series_invert  s'    RYY**1-==a@AYAC2#>>VD ?> ECy44F; 5 RYY**1-66qq6ABY77+>+>#?'(BS#S=C2#>>F; ?> TFWWT@F""62 RYY**1-==a@3FGV<
v. ]#Yz1FGGF; HG 8Cy44F; 54G ?>> 544 ?>>( HGG 544s<   'J?/KK'K;L?K	K$	'K8	;L	L 	c                	L   R p\        \        P                  P                  ^4      P	                  R4      4      pV) p\
        P                  ! W1VR7      p\        P                  ! WV4       \        \        P                  P                  ^4      P                  ^RR7      4      pV) p\
        P                  ! W1VR7      p\        P                  ! WV4       \        \        P                  P                  ^4      P	                  R4      R8  4      pVR8X  dJ   Rp\        P                  ! \        VR7      ;_uu_ 4        \
        P                  ! W1VR7       RRR4       R# V) p\
        P                  ! W1VR7      p\        P                  ! WV4       R#   + '       g   i     R# ; i)	-lhsr   r   rN   r#   *couldn't find matching opcode for 'neg_bb'r   Nr   )r   rC   rQ   rR   rS   r   r   r   r   r   r+   r   r   r   r2   r=   r   rE   r   r   r   s   &&&     r3   test_frame_negateTestEval.test_frame_negate  s5    		--a0@@HIV<
f- 		--a099!&9IJV<
f- 		--a0@@H3NOY>C2#>>F; ?> TFWWT@F!!&1 ?>>   <FF#	c                	L   R p\        \        P                  P                  ^4      P	                  ^4      4      pV) p\
        P                  ! W1VR7      p\        P                  ! WV4       \        \        P                  P                  ^4      P                  ^^R7      4      pV) p\
        P                  ! W1VR7      p\        P                  ! WV4       \        \        P                  P                  ^4      P	                  ^4      R8  4      pVR8X  dJ   Rp\        P                  ! \        VR7      ;_uu_ 4        \
        P                  ! W1VR7       RRR4       R# V) p\
        P                  ! W1VR7      p\        P                  ! WV4       R#   + '       g   i     R# ; i)r  r   r   rN   r#   r  r   N)r   rC   rQ   rR   rS   r   r   r   r   r   r+   r   r   r  s   &&&     r3   test_series_negateTestEval.test_series_negate  s5    RYY**1-==a@AV<
v. RYY**1-66qq6ABV<
v. RYY**1-==a@3FGY>C2#>>F; ?> TFWWT@F""62 ?>>r  rE   r   rZ   c                	    \        V4      pR pTp\        P                  ! WBVR7      p\        P                  ! WV4       R# z+lhsr   N)r   r   r   r   r   r   rE   r2   r=   r   r   r   s   &&&&   r3   test_frame_posTestEval.test_frame_pos  s5     nV<
f-r;   c                	    \        V4      pR pTp\        P                  ! WBVR7      p\        P                  ! WV4       R# r  r   r   r   r   r   r  s   &&&&   r3   test_series_posTestEval.test_series_pos%  s5     SkV<
v.r;   c                	   R pRp\         '       d   VR8X  d   VR8X  g   \        p\        P                  ! \        VR7      ;_uu_ 4        \
        P                  ! RWR7       RRR4       \
        P                  ! RW!R7      R8X  g   Q h\
        P                  ! R
W!R7      R	8X  g   Q h\
        P                  ! RW!R7      R8X  g   Q h\
        P                  ! RW!R7      R8X  g   Q h\
        P                  ! RW!R7      ^8X  g   Q h\        P                  ! VRRR7      ;_uu_ 4        \
        P                  ! RW!R7      R( 8X  g   Q h RRR4       \        P                  ! VRRR7      ;_uu_ 4        \
        P                  ! RW!R7      R( 8X  g   Q h RRR4       \
        P                  ! RW!R7      R8X  g   Q h\
        P                  ! RW!R7      ^ 8X  g   Q h\
        P                  ! RW!R7      ^8X  g   Q h\
        P                  ! RW!R7      ^ 8X  g   Q hR#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i)z%bad operand type for unary ~: 'float'Nr#   r   r   z~1.0r   z-1.0r=   r2   g      ?z+1.0z~1z-1z+1zBitwise inversionF)r   check_stacklevelz~TrueTz~Falsez-Truez-Falsez+Truez+Falseg      )	r   DeprecationWarningr+   r   r   r   r   r   assert_produces_warning)r   r2   r=   r   warns   &&&  r3   test_scalar_unaryTestEval.test_scalar_unary8  s   55&I-&H2D%D]]9C00GGF69 1 wwvf<DDDwwvf<DDDwwtF:b@@@wwtF:b@@@wwtF:b@@@''+e
 
 7776AdUJJJ
 ''+e
 
 778FBufLLL
 wwwv=FFFwwx>&HHHwwwv=FFFwwx>&HHH' 100
 

 
s$   	H&!H-1!I H*	-H=	 I	c                	    \         P                  ! \        P                  ! R 4      \         P                  R7      p\         P                  ! . RO\         P                  R7      p\
        P                  ! W4       R# )z>[-True, True, +True, -False, False, +False, -37, 37, ~37, +37]rZ   N)
r  Tr   r   Fr   i%   ir  )rC   r   r   r   object_r   r   )r   r   r   s   &  r3   test_unary_in_arrayTestEval.test_unary_in_arrayR  sT     GGTU**
 88 **
 	##F5r;   r   zx < -0.1z-5 > xc                	    \        R \        P                  ! ^ .VR7      /4      pVP                  V4      pVP                  \        P                  ! R.4      8X  g   Q hR# )r   rZ   FN)r   rC   r   r   r   )r   float_numpy_dtyper   dfr   s   &&&  r3   test_float_comparison_bin_op%TestEval.test_float_comparison_bin_opk  sK     RXXqc1BCDEggdmzzRXXug....r;   c                	z   \        R ^ ^\        P                  ./4      pVP                  R4      pVP                  P                  R4      p\        P                  ! W#\        '       * R7       VP                  R4      pVP                  P                  ^RR7      p\        P                  ! W#\        '       * R7       R# )r   zx.fillna(-1)check_nameszx.shift(1, fill_value=-1))
fill_valueNr  )
r   rC   rD   r   r   fillnar   r   r   shiftr   r%  r   r   s   &   r3   test_unary_in_functionTestEval.test_unary_in_functionr  s    aBFF^,-(44;;r? 	v_M4544::aB:/
v_Mr;   r   c                	   \         P                  P                  ^4      P                  ^4      ^^rep\	        \         P                  P                  ^4      P                  R4      4      pRp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! WVR7       RRR4       R#   + '       g   i     R# ; i)rM   ;cannot evaluate scalar only bool ops|'BoolOp' nodes are notr   r   N   rM   )
rC   rQ   rR   rS   r   r+   r   r   r   r   )	r   r   r2   r=   r   r   r   r%  r   s	   &&&&     r3   test_disallow_scalar_bool_ops&TestEval.test_disallow_scalar_bool_ops  s     ))''*::1=q!aryy,,Q/??GHK]].c::GGBf5 ;:::s   B22C	c                	   ^p\         P                  ! RWR7      pV^8X  g   Q h\        V4      '       g   Q hRp\         P                  ! RWR7      pVR8X  g   Q h\        V4      '       g   Q hRp\         P                  ! RWR7      pV'       d   Q h\        V4      '       g   Q h\        V4      '       g   Q h\        P
                  ! ^.4      p\         P                  ! RWR7      p\        P                  ! V\        P
                  ! ^.4      4       VP                  R8X  g   Q h\        P
                  ! R.4      p\         P                  ! RWR7      p\        P                  ! V\        P
                  ! R.4      4       VP                  R8X  g   Q h\        P
                  ! R.4      p\         P                  ! RWR7      p\        P                  ! V\        P
                  ! R.4      4       VP                  R8X  g   Q hR# )r   r   r   g      ?FN)r   )	r   r   r   r   rC   r   r   r   shape)r   r2   r=   r   r   s   &&&  r3   test_identicalTestEval.test_identical  s   V;{{    V;}}    V;zv    HHaSMV;
##FBHHaSM:||t###HHcUOV;
##FBHHcUO<||t###HHeWV;
##FBHHeW,=>||t###r;   c                	L    R p\         P                  ! W1VR7      pV^8X  g   Q hR# )z1 + 2 *         5 - 1 + 2 r   Nr   r   )r   r2   r=   expr   s   &&&  r3   test_line_continuationTestEval.test_line_continuation  s%    F;||r;   c                	   R p\         P                  ! W1VR7      p\        P                  ! V4      pWE8X  g   Q h\	        R. RO/4      pRpVP                  RVR 24      pVP                  '       g   Q hRpVP                  RVR 24      pVP                  ^^.R	3,          p\        P                  ! WT4       RpVP                  R
VR 24      pVP                  ^.R	3,          p\        P                  ! WT4       R# )z1000000000.006r   A$  eAg  eAzA < z.4fg   eAzA > NNNA == N)g~  eArB  g'1  eA)
r   r   rC   rd   r   queryemptylocr   r   )	r   r2   r=   r=  r   r   r%  cutoffexacts	   &&&      r3   test_float_truncationTestEval.test_float_truncation  s    F;::c?!!!PQR D-.|||| D-.661a&!)$
h/E%-.661#q&>
h/r;   c                	   \        . RO.. R	OR7      pRp\        P                  ! \        VR7      ;_uu_ 4        VP	                  R4       RRR4       \        4       pRVP
                  n        \        P                  ! \        VR7      ;_uu_ 4        VP	                  R4       RRR4       R#   + '       g   i     Lk; i  + '       g   i     R# ; i)
r   columnsz4Python keyword not valid identifier in numexpr queryr   z
class == 0Nlambdazlambda == 0)r   r   r   )foobarclass)r   r+   r   SyntaxErrorrE  indexnamer   r%  r   s   &  r3   test_disallow_python_keywords&TestEval.test_disallow_python_keywords  s    	{,CDD]];c22HH\" 3 [ ]];c22HH]# 32 32
 322s   B.C.B>	C	c                	B   \         P                  ! \        \        R R7      ;_uu_ 4        \        P
                  ! R4      R8X  g   Q h\        P
                  ! R4      R8X  g   Q h\        P
                  ! R4      ^ 8X  g   Q h RRR4       R#   + '       g   i     R# ; i)F)r  znot Truez	not FalsezTrue and not TrueNr  r  )r   maybe_produces_warningr  r   r   r   )r   s   &r3   test_true_false_logicTestEval.test_true_false_logic  s{     &&
 
 77:&",,,77;'2---77./1444
 
 
 
s   ABB	c                	   \        R R/4      p\        P                  ! VP                  P	                  R4      P
                   4      '       g   Q h\        P                  ! VP                  P	                  R4      P
                  ;'       d&    VP                  P	                  R4      P
                   4      '       g   Q hR# )r   helloN)r   r   r   rA   r   r   )r   events   & r3   test_and_logic_string_match$TestEval.test_and_logic_string_match  s    W~&ww%))//'24457777ww%))//'244SS9Q9S9STVVVVr;   c                	    \        . RORR7      P                  4       pVP                  RWR7      p\        . RORR7      p\        P                  ! WT4       R# )rM   r   rU  za + ar   N)rM         )      8   )r   to_framer   r   r   )r   r2   r=   r%  r   r   s   &&&   r3   test_eval_keep_nameTestEval.test_eval_keep_name  sC    Kc*335gggfg<+C0
x-r;   c                	~    \        ^*.RR7      p\        P                  ! RWR7      p\        P                  ! W44       R# )*   series_namerc  zvariable_name + 0r   Nr  )r   r2   r=   variable_namer   s   &&&  r3   test_eval_unmatching_names#TestEval.test_eval_unmatching_names  s/    t-8gg)&H
}2r;   ru   N)z!=z==z<=z>=ry   rz   )r   eqleger{   r|   >   r   r   //r   )TFTFT)z1 or 2z1 and 2za and bza or bz1 or 2 and (3 + 2) > 3z2 * x > 2 or 1 and 2z2 * df > 3 and 1 or a)4__name__
__module____qualname____firstlineno__r+   r-   parametrizer   BOOL_OPS_SYMSr   CMP_OPS_SYMSr   r   r   sortedsetr   
differencer   r   r   r/   skip_if_windowsr   r   r   r   r  r	  rC   rQ   rR   rS   r   r   bool_r  r  r  r!  r&  r/  r5  r9  r>  rJ  rW  r[  r`  rj  rp  __static_attributes__ru   r;   r3   rx   rx      s#   [[*0  
 [[Vc3ZdD\B[[Wd&8&89* : C*  [[Xt'8'89. :.B [[T4#4#4515 615f [[Vc3Z0[[Vc3Z09 1 19. [[&^,778IJK99@5$, 5 521+<Z-<^2434 [[ II!!!$44V<II!!!$--af-=HH5RXXF	

.
. [[ II!!!$44Q7II!!!$--aa-8HH5RXXF	

/
/I462 [[Vj(%;</ =/N [[	
66$B0,
$5W.3r;   rx   c                      ] tR tRt]P
                  P                  R. RO4      ]P
                  P                  RRR	.4      R 4       4       tRtR# )
TestTypeCastingi  r   
left_rightc                	   Tp\        \        P                  P                  ^4      P	                  R4      VR7      pVw  rV	 RV RV
 2p\
        P                  ! WVR7      pVR8X  d9   VR8X  d2   \        P                  P                  RR7      pVP                  V4       VP                  P                  V8X  g   Q hVP                  P                  V8X  g   Q h\        P                  ! V\        V4      RR	7       R
# )rM   rZ    r   	complex64r#   zfnumexpr issue with complex that are upcast to complex 128 https://github.com/pydata/numexpr/issues/492r'   F)check_exactNrP   r4  )r   rC   rQ   rR   rS   r   r   r+   r-   r   r   r   r[   r   r   )r   r2   r=   r   complex_or_float_dtyper  r:   r[   r%  leftrightre   r   r-   s   &&&&&&&       r3   test_binop_typecasting&TestTypeCasting.test_binop_typecasting  s     'ryy,,Q/??GuU fAbT5'"ggav6KFi$7;;$$? % D
 %yy%'''zz5(((
c47>r;   ru   N)+-*r   /)r%  3)r  r%  )	rv  rw  rx  ry  r+   r-   rz  r  r  ru   r;   r3   r  r    sG    [[T#=> [[\K+EF? G ??r;   r  c                     \        \        \        P                  ! R 4      V 4      4      '       * p\	        \        P
                  R V  4       4      pT;'       d    T# )is_monotonic_increasingc              3  ~   "   T F3  p\        VP                  P                  \        P                  4      x  K5  	  R # 5ir7   )
issubclassr[   typerC   
datetime64r   s   & r3   r4   should_warn.<locals>.<genexpr>  s&     M1z!'',,>>s   ;=)anymapoperator
attrgetterr   xor)argsnot_monoonly_one_dts   *  r3   should_warnr    sK    s8../HI4PQQHMMK ###r;   c                  V   ] tR tRt. R Ot. ]ORNtR t]P                  P                  R4      ]P                  P                  R]4      ]P                  P                  R]4      ]P                  P                  R]4      R	 4       4       4       4       t]P                  P                  R
]4      ]P                  P                  R]4      R 4       4       t]P                  P                  R4      ]P                  P                  R]4      ]P                  P                  R]4      ]P                  P                  R]4      ]P                  P                  R]4      R 4       4       4       4       4       t]P                  P                  R4      ]P                  P                  RRR.4      ]P                  P                  R]4      ]P                  P                  R
]4      R 4       4       4       4       t]P                  P                  RRR.4      ]P                  P                  R. ]! ]! RR.RR.4      4      OR!N4      ]P                  P                  R4      R 4       4       4       t]P                  P                  R4      ]P                  P                  R]4      ]P                  P                  R
]4      ]P                  P                  RRR.4      ]P                  P                  RRR.4      R 4       4       4       4       4       t]P                  P                  R4      ]P                  P                  R]4      ]P                  P                  R]4      ]P                  P                  R]4      ]P                  P                  R]4      R 4       4       4       4       4       tR tRtR# )"TestAlignmenti$  rW   re   c                	    R p\        \        P                  P                  ^4      P	                  R4      4      p\
        P                  ! W1VR7      p\        P                  ! WTR,          4       R# )zdf * ~2r   Nr  )	r   rC   rQ   rR   rS   r   r   r   r   )r   r2   r=   re   r%  r   s   &&&   r3   test_align_nested_unary_op(TestAlignment.test_align_nested_unary_op(  sM    ryy,,Q/??GHggav6
c7+r;   zalways::RuntimeWarninglr_idx_typerr_idx_type
c_idx_typec                	   \        \        P                  P                  ^4      P	                  R4      Wc,          ! ^
4      We,          ! ^
4      R7      p\        \        P                  P                  ^4      P	                  R4      Wd,          ! ^4      We,          ! ^
4      R7      p\        VP                  VP                  4      '       dE   \        P                  ! \        4      ;_uu_ 4        \        P                  ! RWR7      p	RRR4       M\        P                  ! RWR7      p	\        P                  ! X	Wx,           4       R#   + '       g   i     L/; i)rM   rT  rN  zdf + df2r   NrO   rO   )   rO   r   rC   rQ   rR   rS   r  rT  r   r  RuntimeWarningr   r   r   )
r   r2   r=   r  r  r  rv   r%  df2r   s
   &&&&&&&   r3   test_basic_frame_alignment(TestAlignment.test_basic_frame_alignment.  s     II!!!$44X>,R0!-b1

 II!!!$44X>,R0!-b1
 rxx++++N;;ggjG <; ''*VCC
c28,	 <;s   -EE	
r_idx_typec                	   \        \        P                  P                  ^4      P	                  R4      WS,          ! ^
4      WT,          ! ^
4      R7      p\
        P                  ! RWR7      p\        P                  ! Wv^8  4       \        \        P                  P                  ^4      P	                  VP                  4      VP                  VP                  R7      p\
        P                  ! RWR7      p\        P                  ! WvV8  4       R# )rM   r  df < 2r   zdf < df3Nr  )r   rC   rQ   rR   rS   r   r   r   r   r8  rT  rN  )	r   r2   r=   r  r  rv   r%  r   df3s	   &&&&&&   r3   test_frame_comparison#TestAlignment.test_frame_comparisonG  s    
 II!!!$44X>+B/!-b1

 gghv=
c6*II!!!$44RXX>((JJ

 ggj?
c8,r;   ignore::RuntimeWarningr1c1r2c2c                	z   \        \        P                  P                  ^4      P	                  R4      Ws,          ! ^4      Wt,          ! ^4      R7      p\        \        P                  P                  ^4      P	                  R4      Wu,          ! ^4      Wv,          ! ^4      R7      p	\        \        P                  P                  ^4      P	                  R4      Wu,          ! ^4      Wv,          ! ^4      R7      p
\        VP                  V	P                  V
P                  4      '       dE   \        P                  ! \        4      ;_uu_ 4        \        P                  ! RWR7      pRRR4       M\        P                  ! RWR7      p\        P                  ! XW,           V
,           4       R#   + '       g   i     L6; i)rM   r  zdf + df2 + df3r   Nr3  )rf  rM   r   r  )r   r2   r=   r  r  r  r  rv   r%  r  r  r   s   &&&&&&&&    r3   #test_medium_complex_frame_alignment1TestAlignment.test_medium_complex_frame_alignment\  s8    II!!!$44V<#A&!%a(

 II!!!$44V<#A&!%a(

 II!!!$44V<#A&!%a(

 rxxCII66++N;;gg.vM <; ''*6IC
c28c>2	 <;s   
F**F:	
index_namerT  rN  c                	   \        \        P                  P                  ^4      P	                  R4      Wd,          ! ^
4      We,          ! ^
4      R7      p\        Ws4      p\        \        P                  P                  ^4      P	                  ^4      VR,          4      p	\        VP                  V	P                  4      '       dE   \        P                  ! \        4      ;_uu_ 4        \        P                  ! RWR7      p
RRR4       M\        P                  ! RWR7      p
VR8X  g   VR8X  d"   VR8X  d   VP                  V	4      MWy,           pMWy,           p\        P                  ! X
V4       R#   + '       g   i     L`; i)	rM   r  NrP   Ndf + sr   Nrk   r#   r  )r   rC   rQ   rR   rS   getattrr   r  rT  r   r  r  r   r   addr   )r   r2   r=   r  r  r  rv   r%  rT  re   r   r   s   &&&&&&&     r3   !test_basic_frame_series_alignment/TestAlignment.test_basic_frame_series_alignmentz  s    II!!!$44X>+B/!-b1

 '299((+;;A>b	Jrxx))++N;;gghvE <; ''(6ACt!3$*i$7rvvayRVHvH
c8, <;s   %E//E?	zr_idx_type, c_idx_typec           
     	   VR 8X  d^   VR9   dW   VR8X  dP   VR8X  dI   VR8X  dB   RV RV RV RV RV 2
pVP                  \        P                  P                  VR	R
7      4       \	        \
        P                  P                  ^4      P                  R4      Wu,          ! ^
4      Wv,          ! ^4      R7      p	\        W4      p
\        \
        P                  P                  ^4      P                  ^4      V
R,          4      p\        VP                  V	P                  4      '       dE   \        P                  ! \        4      ;_uu_ 4        \         P"                  ! RW#R7      pRRR4       M\         P"                  ! RW#R7      pVR8X  g   VR8X  d"   VR 8X  d   V	P%                  V4      MW,           pMW,           p\        P&                  ! XV4       R#   + '       g   i     L`; i)r#   rT  rW   re   z"Flaky column ordering when engine=z	, parser=z, index_name=z, r_idx_type=z, c_idx_type=F)r(   strictr  r  zs + dfr   Nrk   )r   r   )rO      )r   r+   r-   r   r   rC   rQ   rR   rS   r  r   r  rT  r   r  r  r   r   r  r   )r   r:   r2   r=   r  r  r  rv   r(   r%  rT  re   r   r   s   &&&&&&&&      r3   !test_basic_series_frame_alignment/TestAlignment.test_basic_series_frame_alignment  s    i..g%c!c! 5VH = zl ;(\zlD 
  1 1 1 NOII!!!$44W=+B/!-a0

 '299((+;;A>b	Jqww))++N;;gghvE <; ''(6ACt!3$*i$7rvvayQVHvH
c8, <;s   	GG#	r   r  r  c                	   \        \        P                  P                  ^4      P	                  R4      Wu,          ! ^
4      Wv,          ! ^
4      R7      p\        W4      p	\        \        P                  P                  ^4      P	                  ^4      V	R,          4      p
RV R2pRV R2p\        VP                  V
P                  4      '       d   \        P                  ! \        4      ;_uu_ 4        \        P                  ! WVR7      pRRR4       \        P                  ! \        4      ;_uu_ 4        \        P                  ! WVR7      pRRR4       M0\        P                  ! WVR7      p\        P                  ! WVR7      pVR	8w  d,   VR	8w  d#   VR
8X  d   \        P                  ! XX4       R# R# R# R#   + '       g   i     L; i  + '       g   i     LW; i)rM   r  r  zs z dfzdf z sr   Nrk   r#   r  )r   rC   rQ   rR   rS   r  r   r  rT  r   r  r  r   r   r   )r   r2   r=   r  r   r  r  rv   r%  rT  re   rE   rG   r   r   s   &&&&&&&&       r3   test_series_frame_commutativity-TestAlignment.test_series_frame_commutativity  s[    II!!!$44X>+B/!-b1

 '299((+;;A>b	J2$clB4rlrxx))++N;;GGCv> <++N;;GGCv> <; 6:A6:A*"4"%%a+ # #5 <;;;s   1F:4G:G
	G	c                	   ^p^p	^V	,          p
\        \        P                  P                  ^4      P	                  W34      Ws,          ! V	4      Wt,          ! V4      R7      p\        \        P                  P                  ^4      P	                  W34      Wu,          ! V
4      Wv,          ! V4      R7      pVP
                  p\        \        P                  P                  ^4      P	                  V4      VRV 4      pVR8X  g   VR8X  d#   VR8X  d   VP                  V4      pMW,           pMW,           pVR8X  g   VR8X  d#   VR8X  d   VP                  V4      pMW,           pMW,           p\        VP                  VP                  VP                  4      '       dE   \        P                  ! \        4      ;_uu_ 4        \        P                  ! RWR7      pRRR4       M\        P                  ! RWR7      pXP                  VP                  8X  g   Q h\        P                   ! VV4       R#   + '       g   i     LF; i)r4  r  Nrk   r#   zdf2 + ser + dfr   )r   rC   rQ   rR   rS   rN  r   r  r  rT  r   r  r  r   r   r8  r   )r   r2   r=   r  r  r  r  rv   r_   m1m2r%  r  rT  ser	expected2r   r   s   &&&&&&&&          r3   #test_complex_series_frame_alignment1TestAlignment.test_complex_series_frame_alignment  s    VII!!!$44bW=#B'!%a(

 II!!!$44bW=#B'!%a(

 RYY**1-==a@%)L:t"GGCL	I		I:t"$==,$> ~Hsyy#))RXX66++N;;gg.vM <; ''*6ICyyHNN***
c8, <;s   >H..H>	c                	   \        \        P                  P                  ^4      P	                  R4      4      p\        \        P                  P                  ^4      P	                  R4      4      pVR8X  d   V'       d   \        pMRpRp\        P                  ! WgR7      ;_uu_ 4        \        P                  ! RW#R7       R	R	R	4       \        \        P                  P                  ^4      P	                  R4      4      p\        P                  ! R4      ;_uu_ 4        \        P                  ! RW#R7       R	R	R	4       \        \        P                  P                  ^4      P	                  R4      4      p\        \        P                  P                  ^4      P	                  R4      4      p\        P                  ! R4      ;_uu_ 4        \        P                  ! RW#R7       R	R	R	4       \        \        P                  P                  ^4      P	                  R4      4      p\        \        P                  P                  ^4      P	                  R4      4      pVR
8H  pV'       g   V'       d   \        p	MRp	\        P                  ! WR7      ;_uu_ 4       p
\        P                  ! RW#R7       V'       g~   V'       dv   \        V
4      ^8X  g   Q h\        V
^ ,          P                  4      p\        P                  ! VP                  VP                   ^,          ,
          4      pRVR R2pW|8X  g   Q hR	R	R	4       R	#   + '       g   i     EL; i  + '       g   i     EL%; i  + '       g   i     EL; i  + '       g   i     R	# ; i)rM     '  r#   FzCAlignment difference on axis 1 is larger than an order of magnituder   r  r   Nr   z_Alignment difference on axis 1 is larger than an order of magnitude on term 'df', by more than z.4gz; performance may suffer.)r  rO   )rO   r  r  )r   rC   rQ   rR   rS   r   r	   r   r  r   r   lenrA   messagelog10r   r8  )r   performance_warningr2   r=   r%  re   seenr   is_python_enginewrnwloggedr   s   &&&&         r3   +test_performance_warning_for_poor_alignment9TestAlignment.test_performance_warning_for_poor_alignment  sm    ryy,,Q/??
KL299((+;;EBCY#6%DDS''88GGHV; 9 299((+;;DAB''..GGHV; / ryy,,Q/??LM299((+;;EBC''..GGHV; / ryy,,Q/??IJ299((+;;EBC!X-$7$CC''771GGHV;#(;1v{"{!A$,,'!&&288A;"67$$*3</HJ 
 & 87- 988 /..
 /.. 877s7   (L?MM'(M; A5M;?M	M$	'M8	;N	ru   N)rW   re   rk   )rk   rk   )rv  rw  rx  ry  index_typeslhs_index_typesr  r+   r-   filterwarningsrz  r  r  r  r  listr   r  r  r  r  r  ru   r;   r3   r  r  $  sf   "K))S)O, [[ 89[[]O<[[]K8[[\;7- 8 9 = :-* [[\?;[[\?;- < <-& [[ 89[[T?3[[T;/[[T;/[[T;/3 0 0 0 4 :
32 [[ 89[[\GY+?@[[\;7[[\?;- < 8 A :-. [[\GY+?@[[ >$wSzC:.
/>> [[ 89!- :	 A!-F [[ 89[[\;7[[\?;[[\GY+?@[[TC:., / A < 8 :
,4 [[ 89[[T?3[[T;/[[T;/[[T;/)- 0 0 0 4 :
)-V-'r;   r  c            
         ] tR tRtR tR t]P                  P                  RRR.4      ]P                  P                  RRR.4      ]P                  P                  R]	P                  4      R	 4       4       4       t]P                  P                  RRR.4      ]P                  P                  RRR.4      ]P                  P                  R]	P                  4      R
 4       4       4       tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t]P                  P=                  RR7      R 4       tR t R  t!R! t"R" t#R# t$R$ t%R% t&]P                  P                  R&^R'^^.]'PP                  ! . 4      R:.4      R( 4       t)]P                  P                  R&. R;O4      R) 4       t*]P                  P                  R*^R'^^.]'PP                  ! . 4      R:^^/.4      R+ 4       t+R, t,R- t-R. t.R/ t/R0 t0R1 t1]P                  P                  R2. R<O4      R3 4       t2]P                  P                  R4R5R6.4      R7 4       t3R8t4R9# )=TestOperationsiA  c                	f    VP                  R ^ 4      ^,           VR &   \        P                  ! V/ VB # levelpopr   r   r   r  kwargss   &*,r3   r   TestOperations.evalB  /     **Wa014www'''r;   c           	     	   . pVR 8X  d   RR.p\         P                  \         P                  ,            Uu. uF  pWC9  g   K  VNK  	  ppR V 4       pV F  pRV R2pRV R2pRV R2p	VR9   dJ   Rp
\        P                  ! \
        V
R	7      ;_uu_ 4        \        P                  ! WqVR
7       RRR4       Ke  \        ^V^V4      pV P                  WqVR
7      pW8X  g   Q h\        W^V4      pV P                  VRV/WR7      pW8X  g   Q h\        ^WL^,           V4      pV P                  V	RV/WR7      pW8X  d   K  Q h	  R# u upi   + '       g   i     EK  ; i)r   r   r   c              3  6   "   T F  qR 8w  g   K  Vx  K  	  R# 5i)ru  Nru   )r1   r   s   & r3   r4   7TestOperations.test_simple_arith_ops.<locals>.<genexpr>Q  s     4IbtrrIs   
z1 z 1zx z (x + 1)z&argument of type 'int' is not iterabler   r   Nr   r   r   )	r   r   r|  r+   r   r   r   r   rJ   )r   r2   r=   exclude_arithr   	arith_opsopsr   r   r   r   expecr   ys   &&&           r3   test_simple_arith_ops$TestOperations.test_simple_arith_opsF  sj   X!8,M ))D,=,==
=& B= 	 
 5I4BbTBrd"+Crd(#C%%>]]9C88GGBf= 98 )B6:IIbI?z!z(6:IIcsAhvIUz!z(BAv>IIcsAhvIUz!z) 
 988s   EEEErG   TFrE   r   c                	2   V R V R V 2p\         R8X  dJ   VR9   dC   Rp\        P                  ! \        VR7      ;_uu_ 4        V P	                  V4       RRR4       R# V P	                  V4      p\	        V4      pWg8X  g   Q hR#   + '       g   i     R# ; ir  r   r   r   Nr   r=   r+   r   r   r   r   rG   rE   r   r   r   r   r=  s   &&&&    r3   test_simple_bool_ops#TestOperations.test_simple_bool_opsi       uAbT3% X""56C2#>>		" ?iim2hzz ?>   BB	c                	2   V R V R V 2p\         R8X  dJ   VR9   dC   Rp\        P                  ! \        VR7      ;_uu_ 4        V P	                  V4       RRR4       R# V P	                  V4      p\	        V4      pWg8X  g   Q hR#   + '       g   i     R# ; ir  r  r  s   &&&&    r3   test_bool_ops_with_constants+TestOperations.test_bool_ops_with_constantsy  r	  r
  c           	     	   \         P                  P                  ^4      P                  R4      p\	        \         P                  P                  ^4      P                  ^
4      4      pRp\
        P                  ! \        VR7      ;_uu_ 4        V P                  RRVRV/R7       RRR4       R#   + '       g   i     R# ; i)	rM   z?N-dimensional objects, where N > 2, are not supported with evalr   x + yr   r   r   N)r4  rf  rP      )	rC   rQ   rR   rS   r   r+   r   r   r   )r   r   r   r   s   &   r3   test_4d_ndarray_fails$TestOperations.test_4d_ndarray_fails  s    II!!!$44\B299((+;;B?@O]].c::IIg33*:I; ;:::s   B..B?	c                	:    V P                  R 4      pV^8X  g   Q hR# )1N)r   )r   r   s   & r3   test_constantTestOperations.test_constant  s    IIcNAvvr;   c                	    \        \        P                  P                  ^4      P	                  R4      4      pV P                  RRV/R7      p\        P                  ! W4       R# )rM   r%  r  NrO   rM   r   rC   rQ   rR   rS   r   r   r   )r   r%  r  s   &  r3   test_single_variable#TestOperations.test_single_variable  sJ    ryy,,Q/??HIii$i4
b&r;   c                	   \        \        P                  P                  ^4      P	                  R4      4      p\
        P                  ! \        RR7      ;_uu_ 4        V P                  R4       RRR4       R#   + '       g   i     R# ; i)rM   name 'x' is not definedr   zdf[x > 2] > 2Nr  )	r   rC   rQ   rR   rS   r+   r   	NameErrorr   r   r%  s   & r3   &test_failing_subscript_with_name_error5TestOperations.test_failing_subscript_with_name_error  sT    ryy,,Q/??GH]]9,EFFIIo& GFFFs   A88B		c                	    \        \        P                  P                  ^4      P	                  R4      4      pV P                  RRV/R7      pV^,           V^8  ,          p\        P                  ! W#4       R# )rM   z(df + 1)[df > 2]r%  r  Nr  r  r.  s   &   r3   test_lhs_expression_subscript,TestOperations.test_lhs_expression_subscript  s]    ryy,,Q/??GH-4*EFBF#
f/r;   c           	     	6   \        \        P                  P                  ^4      P	                  R4      \        R4      R7      pRpVP                  VP                  8  pRpVP                  VP                  ,           VP                  ,           pRpVP                  VP                  ,           VP                  VP                  ^ 8  ,          ,           pW$V3pW5V3p	\        WRR7       F.  w  r\        P                  ! WP                  V
RV/R	7      4       K0  	  R
# )rM   abcrM  zdf.a < df.bzdf.a + df.b + df.czdf.a + df.b + df.c[df.b < 0]T)r  r%  r  Nr  )r   rC   rQ   rR   rS   r  r   r   rH   zipr   r   r   )r   r%  expr1expec1expr2expec2expr3expec3exprsexpecsrI   r  s   &           r3   test_attr_expression#TestOperations.test_attr_expression  s    II!!!$44V<d5k
 $rtt#.rttBDD1H~-e#'E$7HA""5))A4*)*MN 8r;   c           	     	   \        \        P                  P                  ^4      P	                  R
4      \        R4      R7      p\        \        P                  P                  ^4      P	                  R
4      4      pRpRp\        P                  ! \        VR7      ;_uu_ 4        V P                  VRVRV/R7       R	R	R	4       R	#   + '       g   i     R	# ; i)rM   r'  rM  zdf = df2%cannot assign without a target objectr   r%  r  r  Nr  )
r   rC   rQ   rR   rS   r  r+   r   r@   r   )r   r%  r  r)  r   s   &    r3   test_assignment_fails$TestOperations.test_assignment_fails  s    II!!!$44V<d5k
 		--a0@@HI5]]:S11IIer5#(>I? 2111s   "CC	c                	.   \        \        P                  P                  ^4      P	                  R4      \        R4      R7      p\        P                  ! \        RR7      ;_uu_ 4        VP                  R4       RRR4       R#   + '       g   i     R# ; i)rM   abrM  invalid syntaxr   zd c = a + bNr   
r   rC   rQ   rR   rS   r  r+   r   rS  r   r   s   & r3   %test_assignment_column_multiple_raise4TestOperations.test_assignment_column_multiple_raise  s_    II!!!$44V<d4j
 ]];.>??GGM" @???s   'BB	c                	2   \        \        P                  P                  ^4      P	                  R4      \        R4      R7      pRp\        P                  ! \        VR7      ;_uu_ 4        VP                  R4       RRR4       R#   + '       g   i     R# ; i)rM   r8  rM  z5left hand side of an assignment must be a single namer   zd,c = a + bNr   r:  rV  s   &  r3   %test_assignment_column_invalid_assign4TestOperations.test_assignment_column_invalid_assign  sc    II!!!$44V<d4j
 F]];c22GGM" 3222   )BB	c                	2   \        \        P                  P                  ^4      P	                  R4      \        R4      R7      pRp\        P                  ! \        VR7      ;_uu_ 4        VP                  R4       RRR4       R#   + '       g   i     R# ; i)rM   r8  rM  zcannot assign to function callr   zTimestamp("20131001") = a + bNr   r:  rV  s   &  r3   3test_assignment_column_invalid_assign_function_callBTestOperations.test_assignment_column_invalid_assign_function_call  sc    II!!!$44V<d4j
 /]];c22GG34 3222r@  c                	0   \        \        P                  P                  ^4      P	                  R	4      \        R4      R7      pVP                  4       pVR,          VR,          ,           VR&   VP                  RRR7       \        P                  ! W4       R# )
rM   r8  rM  r   r   	a = a + bTinplaceNr   
r   rC   rQ   rR   rS   r  copyr   r   r   r   r%  r   s   &  r3   &test_assignment_single_assign_existing5TestOperations.test_assignment_single_assign_existing  p    II!!!$44V<d4j
 779 5
T*
b+r;   c                	0   \        \        P                  P                  ^4      P	                  R
4      \        R4      R7      pVP                  4       pVR,          VR,          ,           VR&   VP                  RRR7       \        P                  ! W4       R	# )rM   r8  rM  r   r   rH   	c = a + bTrF  Nr   rH  rJ  s   &  r3   !test_assignment_single_assign_new0TestOperations.test_assignment_single_assign_new  rM  r;   c                	F   \        \        P                  P                  ^4      P	                  R	4      \        R4      R7      pVP                  4       p^pVP                  RRR7       VP                  4       p^VR,          ,           VR&   \        P                  ! W4       R# )
rM   r8  rM  z	a = 1 + bTrF  r   r   Nr   rH  )r   r%  r   r   s   &   r3   +test_assignment_single_assign_local_overlap:TestOperations.test_assignment_single_assign_local_overlap  s|    II!!!$44V<d4j
 WWY
T*779HSM)
b+r;   c                	p   \        \        P                  P                  ^4      P	                  R	4      \        R4      R7      p^pVP                  P                  4       pVP                  RRR7       W1P                  ,           p\        P                  ! WAP                  RR7       VP                  e   Q hR# )
rM   r8  rM  rE  TrF  Fr)  Nr   )r   rC   rQ   rR   rS   r  r   rI  r   r   r   r   rU  )r   r%  r   old_ar   s   &    r3   "test_assignment_single_assign_name1TestOperations.test_assignment_single_assign_name  s    II!!!$44V<d4j
 		
T*
vtt?{{"""r;   c                	X   \        \        P                  P                  ^4      P	                  R
4      \        R4      R7      pVP                  RRR7       Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  R4       R	R	R	4       R	#   + '       g   i     R	# ; i)rM   r8  rM  rO  TrF  z#can only assign a single expressionr   z	c = a = bNr   )
r   rC   rQ   rR   rS   r  r   r+   r   rS  rV  s   &  r3   test_assignment_multiple_raises.TestOperations.test_assignment_multiple_raises  sr    II!!!$44V<d4j
 	T*3]];c22GGK  3222s   <BB)	c                	8   \        \        P                  P                  ^4      P	                  R4      \        R4      R7      pV P                  RRV/VRR7       VP                  4       pVR,          VR,          ,           VR	&   \        P                  ! W4       R
# )rM   r8  rM  zc = df.a + df.br%  T)r   targetrG  r   r   rH   Nr   
r   rC   rQ   rR   rS   r  r   rI  r   r   rJ  s   &  r3   test_assignment_explicit'TestOperations.test_assignment_explicit  sy    II!!!$44V<d4j
 			#r
2t	T779 5
b+r;   c                	    \        R ^.RR./4      pVP                  RVR7      p\        R.R R7      p\        P                  ! W44       R# )r   r   za in [11, -32]r2   Trc  Ni)r   r   r   r   r   )r   r2   r%  r   r   s   &&   r3   test_column_inTestOperations.test_column_in  sH    bT3./)&94&s+
v0r;   z%Unknown: Omitted test_ in name prior.r'   c                	<   \        \        P                  P                  ^4      P	                  R
4      \        R4      R7      pVP                  RRR7      pVf   Q hVP                  4       pVR,          VR,          ,           VR	&   \        P                  ! W4       R# )rM   r8  rM  rO  FrF  Nr   r   rH   r   r^  )r   r%  actualr   s   &   r3   test_assignment_not_inplace*TestOperations.test_assignment_not_inplace  s     II!!!$44V<d4j
 e4!!!779 5
b+r;   c                	h   \        R . ROR. RO/4      pVP                  4       pVR ,          VR,          ,           VR&   VR,          VR,          ,           VR&   VP                  RRR7      p\        P                  ! W!4       Ve   Q hVR ,          ^,
          VR &   VR ,          ^,           VR&   VP                  R	RR7      p\        P                  ! W!4       Ve   Q hR
p\
        P                  ! \        VR7      ;_uu_ 4        VP                  RRR7       RRR4       R#   + '       g   i     R# ; i)r   r   rH   d$
        c = a + b
        d = c + bTrF  NrI   $
        a = a - 1
        e = a + 2z@Multi-line expressions are only valid if all expressions containr   z(
            a = b + 2
            b - 2Fr   rM   r4  rf  rP   r  )r   rI  r   r   r   r+   r   r@   )r   r%  r   answerr   s   &    r3   test_multi_line_expression)TestOperations.test_multi_line_expression+  s!   YY78779 5 5 	  
 	h+~~ ) ) 	  
 	h+~~ Q]]:S11GG 	   2111s   D  D1	c                	   \        R . R
OR. RO/4      pVP                  4       pVR ,          VR,          ,           VR&   VR,          VR,          ,           VR&   VP                  RRR7      p\        P                  ! W!4       VR ,          ^,
          VR &   VR ,          ^,           VR&   VP                  RRR7      p\        P                  ! W!4       R	# )r   r   rH   rj  rk  FrF  rI   rl  Nrm  rn  r   rI  r   r   r   rJ  s   &  r3   &test_multi_line_expression_not_inplace5TestOperations.test_multi_line_expression_not_inplaceP  s    YY78779 5 5WW 	  
 	h+ ) )WW 	  
 	h+r;   c                	    \        R . ROR. R	O/4      pVP                  4       p^pVR ,          V,          VR&   VR,          V,           VR&   VP                  RRR7      p\        P                  ! W!4       Ve   Q hR# )
r   r   rH   rj  z?
        c = a * @local_var
        d = c + @local_var
        TrF  Nrm  rn  rs  )r   r%  r   	local_varro  s   &    r3   )test_multi_line_expression_local_variable8TestOperations.test_multi_line_expression_local_variablei  s    YY78779	 	1 	1   
 	h+~~r;   c                	   \        R . R	OR. R
O/4      pR pVP                  4       pVR ,          V! ^^4      ,          VR&   VR,          V! ^^4      ,           VR&   VP                  RRR7      p\        P                  ! W14       Ve   Q hR# )r   r   c                    V# r7   ru   r   r   s   &&r3   
local_funcUTestOperations.test_multi_line_expression_callable_local_variable.<locals>.local_func      Hr;   rH   rj  zM
        c = a * @local_func(1, 7)
        d = c + @local_func(1, 7)
        TrF  Nrm  rn  rs  r   r%  r}  r   ro  s   &    r3   2test_multi_line_expression_callable_local_variableATestOperations.test_multi_line_expression_callable_local_variable{  s    YY78	 779 
1a(88 
1a(88   
 	h+~~r;   c                	   \        R . R
OR. RO/4      pR pVP                  4       pVR ,          V! ^^R7      ,          VR&   VR,          V! ^^R7      ,           VR&   VP                  RRR7      p\        P                  ! W14       Ve   Q hR	# )r   r   c                    V# r7   ru   r|  s   &&r3   r}  aTestOperations.test_multi_line_expression_callable_local_variable_with_kwargs.<locals>.local_func  r  r;   )r   r   rH   rj  zU
        c = a * @local_func(b=7, a=1)
        d = c + @local_func(b=7, a=1)
        TrF  Nrm  rn  rs  r  s   &    r3   >test_multi_line_expression_callable_local_variable_with_kwargsMTestOperations.test_multi_line_expression_callable_local_variable_with_kwargs  s    YY78	 779 
Q!(<< 
Q!(<<   
 	h+~~r;   c                	   \        R . ROR. RO/4      pVP                  4       pRp\        P                  ! \        VR7      ;_uu_ 4        VP                  R4       RRR4       \        P                  ! W4       R#   + '       g   i     L(; i)r   r   r4  r   za = 1Nrm  rn  )r   rI  r+   r   r@   rE  r   r   )r   r%  df_origr   s   &   r3   test_assignment_in_query'TestOperations.test_assignment_in_query  s^    YY78'')5]]:S11HHW 2
b* 21s   
A<<B	c                	"   \        R . ROR. R	O/4      pVP                  4       pW"R ,          ^8H  ,          pVP                  RRR7       \        P                  ! W!4       / pR ^/pV P                  RVRR7       \        P                  ! W4       R# )
r   r   za == 2TrF  	a = 1 + 2r]  rG  Nrm  rn  )r   rI  rE  r   r   r   assert_dict_equalrJ  s   &  r3   test_query_inplace!TestOperations.test_query_inplace  s}    YY78779SMQ./
4(
h+8		+b$	7
R*r;   invalid_targetcatc                	   R pRp\         P                  ! \        VR7      ;_uu_ 4        V P                  W1RR7       RRR4       \	        VR4      '       dC   \         P                  ! \        VR7      ;_uu_ 4        V P                  W1RR7       RRR4       R# R#   + '       g   i     Lf; i  + '       g   i     R# ; i)z)Cannot assign expression output to targetr  r   Tr  NrI  F)r+   r   r@   r   hasattrr   r  r   
expressions   &&  r3   test_cannot_item_assign&TestOperations.test_cannot_item_assign  s    9 
]]:S11IIjIF 2 >6**z55		*U	K 65 + 21 655s   B;B.B+	.B?	c                	    R pRp\         P                  ! \        VR7      ;_uu_ 4        V P                  W1RR7       RRR4       R#   + '       g   i     R# ; i)z"Cannot return a copy of the targetr  r   Fr  N)r+   r   r@   r   r  s   &&  r3   test_cannot_copy_item$TestOperations.test_cannot_copy_item  s<    2 
]]:S11IIjIG 2111s   AA	r]  c                	    R pV P                  W!RR7      ^8X  g   Q hRp\        P                  ! \        VR7      ;_uu_ 4        V P                  W!RR7       RRR4       R#   + '       g   i     R# ; i)1 + 2Fr  z0Cannot operate inplace if there is no assignmentr   TN)r   r+   r   r@   )r   r]  r  r   s   &&  r3   test_inplace_no_assignment)TestOperations.test_inplace_no_assignment  sW    
yyEyBaGGG@]]:S11IIjI> 2111s   A!!A2	c           	     	&   \        \        P                  P                  ^4      P	                  R	4      \        RR^R7      R7      pV^8  pV P                  RRV/R7      pV^8  p\        P                  ! W24       \        P                  ! WB4       R# )
rM   rm   rs   rt   ro   rM  r  r%  r  NrM   rM   	r   rC   rQ   rR   rS   r   r   r   r   )r   r%  rI   rr   s   &    r3   *test_basic_period_index_boolean_expression9TestOperations.test_basic_period_index_boolean_expression  s{    II!!!$44V< CC
 FIIhD":I6F
a#
a#r;   c           	     	    \        \        P                  P                  ^4      P	                  R	4      \        RR^R7      R7      pV P                  RRV/R7      pW^8  ,          p\        P                  ! W#4       R# )
rM   rm   rs   r  rM  zdf[df < 2 + 3]r%  r  Nr  r  r   r%  r  rI   s   &   r3   ,test_basic_period_index_subscript_expression;TestOperations.test_basic_period_index_subscript_expression  sg    II!!!$44V< CC
 II&D":I>EzN
a#r;   c           	     	,   \        \        P                  P                  ^4      P	                  R	4      \        RR^R7      R7      pV P                  RRV/R7      pWV^8  ,          ^8  ,          V^,          ,           p\        P                  ! W#4       R# )
rM   rm   rs   r  rM  zdf[df[df < 2] < 2] + df * 2r%  r  Nr  r  r  s   &   r3   -test_nested_period_index_subscript_expression<TestOperations.test_nested_period_index_subscript_expression  sy    II!!!$44V< CC
 II3r
IK"q&zA~a'
a#r;   c                	   \        \        P                  P                  ^4      P	                  R	4      4      p\        R^R7      VR&   V P                  RRV/VVR7      pVP                  R8  p\        P                  ! WE4       R# )
rM   z1/1/2012rn   dates1zdf.dates1 < 20130101r%  r   20130101Nr  )
r   rC   rQ   rR   rS   r   r   r  r   r   )r   r2   r=   r%  r   r  s   &&&   r3   test_date_boolean TestOperations.test_date_boolean  sw    ryy,,Q/??GH!*a88ii"bz	  
 		J&
s*r;   c                	   VR 8w  EdW   \         P                  ! RWR7      pV'       g   Q h\         P                  ! RWR7      pV'       g   Q h\         P                  ! RWR7      pV'       d   Q h\         P                  ! RWR7      pV'       g   Q h\         P                  ! RWR7      pV'       g   Q h\         P                  ! RWR7      pV'       g   Q h\         P                  ! RWR7      pV'       g   Q h\         P                  ! R	WR7      pV'       g   Q h\         P                  ! R
WR7      pV'       d   Q h\         P                  ! RWR7      pV'       g   Q hR# Rp\        P                  ! \        VR7      ;_uu_ 4        \         P                  ! RWR7       RRR4       \        P                  ! \        VR7      ;_uu_ 4        \         P                  ! RWR7       RRR4       \        P                  ! \        VR7      ;_uu_ 4        \         P                  ! RWR7       RRR4       \        P                  ! \        VR7      ;_uu_ 4        \         P                  ! RWR7       RRR4       Rp\        P                  ! \        VR7      ;_uu_ 4        \         P                  ! RWR7       RRR4       \        P                  ! \        VR7      ;_uu_ 4        \         P                  ! RWR7       RRR4       R#   + '       g   i     ELn; i  + '       g   i     EL=; i  + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)r   z1 in [1, 2]r   z2 in (1, 2)z3 in (1, 2)z3 not in (1, 2)z[3] not in (1, 2)z[3] in ([3], 2)z[[3]] in [[[3]], 2]z(3,) in [(3,), 2]z(3,) not in [(3,), 2]z[(3,)] in [[(3,)], 2]z'In' nodes are not implementedr   Nz[(3,)] in (1, 2, [(3,)])z!'NotIn' nodes are not implementedz[3] not in (1, 2, [[3]]))r   r   r+   r   r   )r   r2   r=   r   r   s   &&&  r3   test_simple_in_ops!TestOperations.test_simple_in_ops  s   X''-FCJ3''-FCJ3''-FCN7''+FJCJ3''-fLCJ3''+FJCJ3''/NCJ3''-fLCJ3''1&PCN7''1&PCJ32C2#>>fD ?2#>>fD ?2#>>fD ?2#>>26Q ?5C2#>>)&H ?2#>>26Q ?> ?>>>>>>>>>> ?>>>>sH   L
LL+L?M M%L	L(	+L<	?M	M"	%M6	c                	p    ^pRP                  R4      p^p\        P                  ! WAVR7      pWe8X  g   Q hR# )r   z * r   N!aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)r   r   r   )r   r2   r=   r   r   r   r   s   &&&    r3   test_check_many_exprs$TestOperations.test_check_many_exprs1  s4    zz(#ggd&9r;   r   c           	     	   \        \        P                  P                  ^4      P	                  R	4      4      pVR8X  dW   RpRV9   d   Rp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! VRV/VVR7       RRR4       R# \        P                  ! VRV/VVR7       R#   + '       g   i     R# ; i)
rM   r   r   not'Not' nodes are not implementedr   r%  )r   r=   r2   Nr  
r   rC   rQ   rR   rS   r+   r   r   r   r   )r   r   r2   r=   r%  r   s   &&&&  r3   test_fails_and_or_not$TestOperations.test_fails_and_or_not8  s     ryy,,Q/??GHX6C}72#>> $bz!!	 ?> GG ":	 ?>>s   .B33C	charr   r   c                	x   \        \        P                  P                  ^4      P	                  R4      4      pRV R2pVR8X  dJ   Rp\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! WSVR7       RRR4       R# \        P                  ! WSVR7       R#   + '       g   i     R# ; i)	rM   z(df + 2)[df > 1] > 0 z	 (df > 0)r   z$cannot evaluate scalar only bool opsr   r  Nr  r  )r   r  r2   r=   r%  r   r   s   &&&&   r3   test_fails_ampersand_pipe(TestOperations.test_fails_ampersand_pipeW  s    ryy,,Q/??GH$TF)4X8C2#>>&9 ?> GGBf5	 ?>>s   +B((B9	ru   Nr   r4  )r   r  r  )zdf > 2 and df > 3zdf > 2 or df > 3z
not df > 2)5rv  rw  rx  ry  r   r  r+   r-   rz  r   r{  r  r  r  r  r  r!  r$  r1  r5  r;  r>  rB  rK  rP  rS  rW  rZ  r_  rc  r   rg  rp  rt  rx  r  r  r  r  rC   r   r  r  r  r  r  r  r  r  r  r  r  r  ru   r;   r3   r  r  A  s   (!"F [[UT5M2[[UT5M2[[T4#5#56 7 3 3 [[UT5M2[[UT5M2[[T4#5#56 7 3 3<'
'
0O@##5,,
,
#!,1 [[EF, G,#J,2$((++ [[-51a&"((2,PV/WX	L Y	L [[-/ABH CH [[X51a&"((2,QRTUPV'WX? Y?
$$$
+-R^ [[	
. [[Vc3Z0	6 1	6r;   r  c                  X   ] tR tRtR t]P                  P                  R4      ]P                  P                  R]	4      R 4       4       t
]P                  P                  R]4      R 4       tR tR t]P                  P                  R	]P                   ]P"                  3]P$                  ]P"                  3]P&                  ]P&                  3]P"                  ]P"                  3]P(                  ! ]P*                  ]P*                  ]P.                  R
7      .4      R 4       tR tR tRtR# )TestMathid  c                	f    VP                  R ^ 4      ^,           VR &   \        P                  ! V/ VB # r  r  r  s   &*,r3   r   TestMath.evale  r  r;   r  fnc                	   \        R \        P                  P                  ^4      P	                  ^
4      /4      pVP
                  pV R2pV P                  WbVR7      p\        P                  ! RR7      ;_uu_ 4        \        \        V4      ! V4      pRRR4       \        P                  ! VX4       R#   + '       g   i     L); i)r   z(a)r   r$   allN)r   rC   rQ   rR   rS   r   r   errstater  r   r   )	r   r  r2   r=   r%  r   r   gotr   s	   &&&&     r3   test_unary_functionsTestMath.test_unary_functionsi  s     RYY2215EEbIJKDDSziiFi;[[X&&R_Q'F '
sF+ '&s   =B55C	c                	   \        R \        P                  P                  ^4      P	                  ^
4      R\        P                  P                  ^4      P	                  ^
4      /4      pVP
                  pVP                  pV R2pV P                  WrVR7      p\        P                  ! RR7      ;_uu_ 4        \        \        V4      ! WV4      p	RRR4       \        P                  ! VX	4       R#   + '       g   i     L); i)r   r   z(a, b)r   r$   r  N)r   rC   rQ   rR   rS   r   r   r   r  r  r   r   )
r   r  r2   r=   r%  r   r   r   r  r   s
   &&&&      r3   test_binary_functionsTestMath.test_binary_functionsu  s    RYY**1-==bARYY**1-==bA
 DDDDV}iiFi;[[X&&R_Q*F '
sF+ '&s   7C//C?	c                	   \        R \        P                  P                  ^4      P	                  ^
4      R\        P                  P                  ^4      P	                  ^
4      /4      pVP                  RVVRR7       VP                  p\        P                  ! \        P                  ! VP                  4      VP                  4      P                  R4      p\        P                  ! WE4       R# )r   r   ze = arctan2(sin(a), b)Tr2   r=   rG  rI   N)r   rC   rQ   rR   rS   r   rI   arctan2sinr   r   renamer   r   r   r2   r=   r%  r  r   s   &&&   r3   test_df_use_caseTestMath.test_df_use_case  s    RYY**1-==bARYY**1-==bA
 	$	 	 	
 ddBFF244L"$$/66s;
s+r;   c                	   \        R \        P                  P                  ^4      P	                  ^
4      R\        P                  P                  ^4      P	                  ^
4      /4      pVP                  RWRR7       VP                  p\        P                  ! VP                  VP                  ,           4      P                  R4      p\        P                  ! WE4       R# )r   r   ze = sin(a + b)Tr  rI   N)r   rC   rQ   rR   rS   r   rI   r  r   r   r  r   r   r  s   &&&   r3    test_df_arithmetic_subexpression)TestMath.test_df_arithmetic_subexpression  s    RYY**1-==bARYY**1-==bA
 	 Mddrtt$++C0
s+r;   zdtype, expect_dtyper)   c                	   \        R \        P                  P                  ^4      P	                  ^
4      P                  V4      /4      pVP                  P                  V8X  g   Q hVP                  RW4RR7       VP                  p\        P                  ! VP                  4      P                  R4      pVP                  VP                  8X  g   Q hW&P                  8X  g   Q h\        P                  ! Wg4       R# )r   z
b = sin(a)Tr  r   N)r   rC   rQ   rR   rS   r   r   r[   r   r   r  r  r   r   )r   r[   expect_dtyper2   r=   r%  r  r   s   &&&&&   r3   test_result_typesTestMath.test_result_types  s      "))''*::2>EEeLM
 ttzzU"""
VDIdd$$S)||syy(((yy(((
s+r;   c                	$   \        R \        P                  P                  ^4      P	                  ^
4      /4      pRp\
        P                  ! \        VR7      ;_uu_ 4        VP                  RWR7       RRR4       R#   + '       g   i     R# ; i)r   z#"mysin" is not a supported functionr   zmysin(a)r   N)	r   rC   rQ   rR   rS   r+   r   r@   r   r   r2   r=   r%  r   s   &&&  r3   test_undefined_funcTestMath.test_undefined_func  s`    RYY2215EEbIJK3]]:S11GGJvG= 2111    A>>B	c                	$   \        R \        P                  P                  ^4      P	                  ^
4      /4      pRp\
        P                  ! \        VR7      ;_uu_ 4        VP                  RWR7       RRR4       R#   + '       g   i     R# ; i)r   z1Function "sin" does not support keyword argumentsr   zsin(x=a)r   N)	r   rC   rQ   rR   rS   r+   r   r   r   r  s   &&&  r3   test_keyword_argTestMath.test_keyword_arg  s`    RYY2215EEbIJKA]]9C00GGJvG= 1000r  ru   N)rv  rw  rx  ry  r   r+   r-   r  rz  r    r  r   r  r  r  rC   int32rd   r]   float32r,   
complex128r/   r  r  r  r  r  ru   r;   r3   r  r  d  s   ( [[ 89[[T?3, 4 :, [[T#34, 5, ,"
, [[XXrzz"XXrzz"ZZ$ZZ$LLR=O=OP	
	,	,">>r;   r  c                  4    ] tR tRtR tR tR tR tR tRt	R# )		TestScopei  c           	     	z    R p\         P                  ! \        ^,          \        P                  ! W1VR7      4       R# )
_var_s * 2r   N)r   r   _var_sr   r   )r   r2   r=   rI   s   &&& r3   test_global_scopeTestScope.test_global_scope  s)    
##QJ@	
r;   c                	    ^p\        4       P                  4       p\        P                  ! RWAVR7       \        4       P                  4       pVP	                  R4       WE8X  g   Q hR# )r   x + 1r   lclsN)localsrI  r   r   r  )r   r2   r=   r   r  lcls2s   &&&   r3   test_no_new_localsTestScope.test_no_new_locals  sG    x}}
DG		&}}r;   c                	    ^p\        4       P                  4       p\        P                  ! RWR7       \        4       P                  4       pWE8X  g   Q hR# )r   r  r   N)globalsrI  r   r   )r   r2   r=   r   gblsgbls2s   &&&   r3   test_no_new_globalsTestScope.test_no_new_globals  s;    y~~
6	 }}r;   c           	     	    ^pRp\         P                  ! \        VR7      ;_uu_ 4        \        P                  ! RW/ R7       RRR4       R#   + '       g   i     R# ; i)r   r  r   r  r   Nr+   r   r
   r   r   )r   r2   r=   r   r   s   &&&  r3   test_empty_localsTestScope.test_empty_locals  s=    ']]1==GGGFbI >===   AA	c           	     	    R pRp\         P                  ! \        VR7      ;_uu_ 4        \        P                  ! WAV/ R7       RRR4       R#   + '       g   i     R# ; i)zname '_var_s' is not definedr  r   )r2   r=   global_dictNr  )r   r2   r=   r   rI   s   &&&  r3   test_empty_globalsTestScope.test_empty_globals  s=    ,]]1==GGAVD >===r  ru   N)
rv  rw  rx  ry  r  r  r  r  r
  r  ru   r;   r3   r  r    s    
JEr;   r  c            	         R p \         P                  ! \        V R7      ;_uu_ 4        \        P                  ! RR^R^/RR7       RRR4       R#   + '       g   i     R# ; i)zInvalid engine 'asdf' passedr   r  r   r   asdf)r   r2   Nr+   r   KeyErrorr   r   r   s    r3   test_invalid_enginer    @    
(C	xs	+	+
S!S!$4VD 
,	+	+	+   AA 	r   c                    ^ RI Hp \        P                  ! RV 4      ;_uu_ 4        V! R4      pW18X  g   Q h RRR4       R#   + '       g   i     R# ; i)r   )_check_enginecompute.use_numexprN)pandas.core.computation.evalr  r   option_context)use_numexprr   r  r   s   &&  r3   test_numexpr_option_respectedr    s@     ;			0+	>	>t$!!! 
?	>	>	>s   AA	c            	     0   \         P                  ! R R4      ;_uu_ 4        \        R. ROR. RO/4      p V P                  R4      p\        RRR.R^^./\	        ^^4      R7      p\
        P                  ! W4       RRR4       R#   + '       g   i     R# ; i)	r  FrA  NBz
A.isnull())rT  )TFTFNN)r   rM   r4  rf  rP   r  )r   r  r   rE  ri   r   r   )r%  r   r   s      r3   #test_numexpr_option_incompatible_opr    s     
		0%	8	88#?QR
 ,'cD$<q!f=U1a[Q
f/ 
9	8	8	8s   ABB	c            	         R p \         P                  ! \        V R7      ;_uu_ 4        \        P                  ! RR^R^/RR7       RRR4       R#   + '       g   i     R# ; i)zInvalid parser 'asdf' passedr   r  r   r   r  )r   r=   Nr  r  s    r3   test_invalid_parserr    r  r  r   r   z dict[str, type[BaseExprVisitor]]_parsersr2   r=   c                    \         V,          pV! R W4      pVP                   FB  pRp\        P                  ! \        VR7      ;_uu_ 4        \        W44      ! 4        RRR4       KD  	  R#   + '       g   i     KY  ; i)r  znodes are not implementedr   N)r   unsupported_nodesr+   r   r   r  )r2   r=   VisitorClassinstr  r   s   &&    r3   test_disallowed_nodesr%  '  s^     F#L0D--)]].c::D  ;: .:::s   A++A<c                    R p\         P                  ! \        RR7      ;_uu_ 4        \        P                  ! W VR7       RRR4       R#   + '       g   i     R# ; i)zs +r9  r   r   Nr+   r   rS  r   r   )r2   r=   rI   s   && r3   test_syntax_error_exprsr(  3  s6    A	{*:	;	;
0 
<	;	;	;   A

A	c                    R pRp\         P                  ! \        VR7      ;_uu_ 4        \        P                  ! W VR7       RRR4       R#   + '       g   i     R# ; i)zs + tzname 's' is not definedr   r   N)r+   r   r  r   r   )r2   r=   rI   r   s   &&  r3   test_name_error_exprsr+  9  s:    A
#C	y	,	,
0 
-	,	,	,s   AA	expressc                   ^^rCVR8w  dH   \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! W VR7       RRR4       R# \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! W VR7       RRR4       R#   + '       g   i     R# ; i  + '       g   i     R# ; i)r   r   zThe '@' prefix is onlyr   r   NzThe '@' prefix is notr'  )r2   r=   r,  r   r   s   &&&  r3   %test_invalid_local_variable_referencer.  @  s    aq]];.FGGGGG6: HG ]];.EFFGGG6: GF HGG GFFs   B6B-B*	-B>	c                "   ^^r2V R8X  dJ   Rp\         P                  ! \        VR7      ;_uu_ 4        \        P                  ! RWR7       RRR4       R# \        P                  ! RWR7      pWRV,           8X  g   Q hR#   + '       g   i     R# ; i)r   r#   zVariables in expression .+r   zsin + dotted_liner   N)r+   r   r   r   r   )r2   r=   r  dotted_liner   r   s   &&    r3   test_numexpr_builtin_raisesr1  L  so    !*]]1==GG'F >= gg)&HK''''	 >==s   A==B	c           	         Rp\         P                  ! \        RR7      ;_uu_ 4        \        P                  ! RW VR7       RRR4       R#   + '       g   i     R# ; i)rm  zResolver of type .+r   r  )	resolversr2   r=   N)rm  g      @)r+   r   r   r   r   )r2   r=   cannot_resolves   && r3   test_bad_resolver_raisesr5  W  s8    N	y(=	>	>
>P 
?	>	>	>s   AA	c                    \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! RWR7       RRR4       R#   + '       g   i     R# ; i)zexpr cannot be an empty stringr    r   Nr+   r   r@   r   r   r   s   &&r3   test_empty_string_raisesr9  ]  s2    	z)I	J	J
61 
K	J	J	J   AA	c                    \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! RWR7       RRR4       R#   + '       g   i     R# ; i)z#only a single expression is allowedr   z1 + 1; 2 + 2r   Nr'  r   s   &&r3   $test_more_than_one_expression_raisesr<  c  s2    	{*O	P	P
v= 
Q	P	P	Pr:  cmprE   rG   c           	        \         R  \        \        P                  P	                  ^4      P
                  /pWP,          ! 4       pWP,          ! 4       p WR,          ! 4       pRV RV R2pRV RV R2pRV RV R2p	WxV	3 FJ  p
Rp\        P                  ! \        VR	7      ;_uu_ 4        \        P                  ! WVR
7       RRR4       KL  	  R#   + '       g   i     Ka  ; i)c                 ^    \         P                  P                  ^4      P                  ^
4      # )rM   )rC   rQ   rR   r   ru   r;   r3   r`   0test_bool_ops_fails_on_scalars.<locals>.<lambda>m  s    RYY**1-66r:r;   r   r   r   r   r   r   r   r2  r   r   N)intfloatrC   rQ   rR   rS   r+   r   r   r   r   )rE   r=  rG   r2   r=   genr   r   r   r   r   r   s   &&&&&       r3   test_bool_ops_fails_on_scalarsrD  h  s    
 	:ryy$$Q'77C
 (*C
(*C
(*CU3%t
$C]3%t
,C#mC5
.CoK]].c::GGBf5 ;: :::s   &CCotherz'x'z...c                    \        R . RO/\        R7      pVP                  RV  24      p\        . ROR R7      p\        P
                  ! W#4       R# )rA  rZ   rD  rc  N)r   r   rH   )FFF)r   objectr   r   r   r   )rE  r%  r   r   s   &   r3   test_equals_variousrH  ~  sD     
C)	8BWWuUG_%F+#6H6,r;   c                j    R p\         P                  p\        P                  ! W VR7      pWC8X  g   Q hR# )zinf + 1r   N)rC   infr   r   )r2   r=   re   r   r   s   &&   r3   test_infrK    s,    AvvHWWQf5Fr;   columnu	   Temp(°C)u   Capacitance(μF)c                    \        \        P                  P                  ^4      P	                  R4      VR.R7      pW"V,          ^8  ,          pRV R2pVP                  W@R7      p\        P                  ! WS4       R# )rM   r   rM  `z` > 5rb  Nr   )r   rC   rQ   rR   rS   rE  r   r   )r2   rL  r%  r   query_stringr   s   &&    r3   test_query_tokenrP    so     

		a 00863-
B V*q.!Hvhe$LXXlX2F&+r;   c                   \        ^ ^
.^^..RR.R7      pW"P                  ^ 8  ( ,          pVP                  RWR7      p\        P                  ! WC4       VR8X  dE   Rp\
        P                  ! \        VR7      ;_uu_ 4        VP                  R	WR7       R
R
R
4       R
# VP                  R	WR7      p\        P                  ! WC4       R
#   + '       g   i     R
# ; i)r   r  countrM  z
~(cat > 0)r   r   r  r   znot (cat > 0)N)r   r  rE  r   r   r+   r   r   )r2   r=   r%  r   r   r   s   &&    r3   test_negate_lt_eq_lerS    s    	QGaW%w/?	@BFFQJ- HXXl6XAF&+/]].c::HH_VHC ;: /&H
f/	 ;::s   CC	c                v   VR9   d8   V P                  \        P                  P                  \        RV 2R7      4       \        \        P                  P                  ^4      P                  ^ ^dR	R7      VR.R7      pW"V,          ^8  ,          pVP                  V R24      p\        P                  ! WC4       R# )
Truez+GH 47859 DataFrame eval not supported with )r   r(   r   col1rM  z>6N)rU  FalserJ  Infr  )r   r+   r-   r   r  r   rC   rQ   rR   r   rE  r   r   )r:   rL  r%  r   r   s   &&   r3    test_eval_no_support_column_namerY    s     00KKDVHM  	
 

		a ))!Sw)? 
B V*q.!HXXm$F&+r;   c            	     ^   \        R . R	OR. R
OR. RO/4      p V R,          pV R ,          pV P                  RRR7       \        R . ROR. R
OR. RO/4      p\        P                  ! W4       \	        . R	OR R7      p\        P
                  ! W#4       \        P
                  ! VR ,          V4       R# )rA  r  CrC  z	A = B + CTrF  rc  Nrm  rn  )r     	   )      rd  )r   r   r   r   r   r   )r%  result_viewr  r   s       r3   test_set_inplacera    s     
CCCC	DBQ%K
S'CGGKG&#|S)S)LMH"'ic*H3);s+X6r;   valuerU  g      @c                    R p\         P                  ! \        VR7      ;_uu_ 4        \        P                  ! RV R7       RRR4       R#   + '       g   i     R# ; i)z8For argument "inplace" expected type bool, received typer   z2+2rF  Nr8  )rb  r   s   & r3   test_validate_bool_argsrd    s5    
DC	z	-	-
u% 
.	-	-	-r)  c                 J    \         P                  ! R RR7      p RpW8X  g   Q hR# )z1 / 2r#   rb  rN   Nr<  )r   r   s     r3   test_eval_float_div_numexprrf    s%     WWWY/FHr;   c                    \        . RO4      p \        . RO4      p\        P                  ! R4      pW,           P                  4       p\        P
                  ! W#4       \        P                  ! R4      pW,          P                  4       p\        P
                  ! W#4       \        P                  ! R4      pW,           P                  4       P                  RR7      p\        P
                  ! W#4       R# )	r   z(x + y).dropna()z(x * y).dropna()z'(x + y).dropna().reset_index(drop=True)T)dropN)r   rM   r4  rP   )rM   r4  rf  )r   r   r   dropnar   r   reset_index)r   r   r   r   s       r3   test_method_calls_on_binoprk    s    |AyA WW'(F~~H6, WW'(F~~H6, WW>?F~~+++6H6,r;   )r   r   	SeriesNaNDataFrameNaNrB  )r  r   ))Tr#   )Fr   )za + @bz@a + bz@a + @br   rm  )r__conditional_annotations__
__future__r   	functoolsr   	itertoolsr   r  numpyrC   r+   pandas.compatr   pandas.compat._optionalr   pandas.errorsr   r	   r
   pandas.util._test_decoratorsutil_test_decoratorsr/   pandas.core.dtypes.commonr   r   r   r   r   r   r   r   r   r   r   r   pandas._testing_testingr   pandas.core.computationr   r   pandas.core.computation.enginesr   pandas.core.computation.exprr   r   r   #pandas.core.computation.expressionsr   r   pandas.core.computation.opsr   r   r   r    pandas.core.computation.scoper!   pandas.util.versionr"   r#   fixturer2   PARSERSr=   rJ   r  ri   rE   rG   r   rv   rx   r  r  r  r  r  rQ   rR   rS   r  r  r0   r  r-   rz  r  r  r  PyTablesExprVisitorr   __annotations__r%  r(  r+  r.  r1  r5  r9  r<  rA  rB  rD  rH  rK  rP  rS  keysrY  ra  rd  rf  rk  )rn  s   @r3   <module>r     s*   " "       > 
 * )     4 
  : '
$Yx
@   !  t||$ % a>E-	-$ 
  k	3 k	3d? ?<$V' V'z`6 `6Ff> f>R 
		q	!	1	1"	5"E "EJ yE E y" " y0 0 yE E ,,.
*  7+8,! - ,!11 $CD; E;(Q2>
 .e-e-6 . . /6& -- K1C#DE, F,0  ,	,(7 1fi"=>& ?& y -r;   