+
    xȇic9                       ^ RI Ht ^ RIt^ RIt^ RIt^ RIHt ^ RIt	^ RI
Ht ^ RIHt ^ RIHtHtHtHt ]P(                  R 4       t]P(                  R 4       t]P(                  R 4       t]P(                  R	 4       t]P(                  R
 4       t]P(                  R 4       t]P(                  R 4       t]P(                  R 4       t ! R R]P:                  4      tR tR t R t!R t"R t# ! R R]4      t$ ! R R]$4      t%]%PM                  4        R t']PP                  PS                  RR. R(O. R)O3R. R*O. R+O3.4      R 4       t*R t+R t,R  t-R! t.R" t/R# t0R$ t1R% t2R& t3R' t4R# ),    )annotationsN)Pandas4Warning)base)DecimalArrayDecimalDtype	make_data
to_decimalc                     \        4       # N)r        {/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/extension/decimal/test_decimal.pydtyper      s
    >r   c                 *    \        \        ^
4      4      # 
   )r   r   r   r   r   datar      s    	"&&r   c                 |    \        \        ^
4       U u. uF  p \        P                  ! ^4      NK  	  up 4      # u up i r   )r   rangedecimalDecimal)_s    r   data_for_twosr      s,    U2Y?Y+Y?@@?s   9c                 l    \        \        P                  ! R 4      \        P                  ! ^4      .4      # )NaNr   r   r   r   r   r   data_missingr   $   s$    /1CDEEr   c                     \        \        P                  ! R 4      \        P                  ! R4      \        P                  ! R4      .4      # )120r   r   r   r   data_for_sortingr"   )   s4    		ws3W__S5IJ r   c                     \        \        P                  ! R 4      \        P                  ! R4      \        P                  ! R4      .4      # )r   r   r!   r   r   r   r   data_missing_for_sortingr$   0   s4    		wu5ws7KL r   c                     R  # )c                R    V P                  4       ;'       d    VP                  4       # r   )is_nan)xys   &&r   <lambda>na_cmp.<locals>.<lambda>9   s    
11qxxz1r   r   r   r   r   na_cmpr,   7   s    11r   c            
         \         P                  ! R 4      p \         P                  ! R4      p\         P                  ! R4      p\         P                  ! R4      p\        W W3WW.4      # )1.0z0.02.0r   )r   r   r   )bacnas       r   data_for_groupingr4   <   sN    AAA		BrqQ233r   c                    a  ] tR t^EtR R ltR R ltR V 3R lltV 3R ltV 3R ltR	 t	R
 t
R tV 3R ltV 3R ltV 3R ltV 3R ltV 3R lt]P$                  P'                  RR7      V 3R l4       tR t]P$                  P'                  RR7      ]P$                  P-                  R]P0                  ]P2                  ]P4                  .4      V 3R l4       4       tRtV ;t# )TestDecimalArrayc                    V ^8  d   QhRRRR/# )   op_namestrreturnz4type[Exception] | tuple[type[Exception], ...] | Noner   )formats   "r   __annotate__TestDecimalArray.__annotate__F   s      	=r   c                	    R # r   r   )selfr9   objothers   &&&&r   _get_expected_exception(TestDecimalArray._get_expected_exceptionF   s     r   c               $    V ^8  d   QhRRRRRR/# )r8   ser	pd.Seriesr9   r:   r;   boolr   )r<   s   "r   r=   r>   K   s!      y 3 4 r   c                	    VR9   d   R# R# )kurtFT)rJ   semr   )r@   rF   r9   s   &&&r   _supports_reduction$TestDecimalArray._supports_reductionK   s    o%r   c               $    V ^8  d   QhRRRRRR/# )r8   rF   rG   r9   r:   skipnarH   r   )r<   s   "r   r=   r>   P   s!     5 5	 5C 5 5r   c                	   < VR 8X  d   \         SV `  WV4      # \        W4      ! VR7      p\        \        P                  ! V4      V4      ! 4       p\
        P                  ! WE4       R# )count)rO   N)supercheck_reducegetattrnpasarraytmassert_almost_equal)r@   rF   r9   rO   resultexpected	__class__s   &&&&  r   rS   TestDecimalArray.check_reduceP   sQ    g7'f==S*&9Frzz#8:H""64r   c                	   < VR9   d6   \         P                  P                  \        R7      pVP	                  V4       \
        SV `  WV4       R# )rJ   raisesN)rJ   skewrK   median)pytestmarkxfailNotImplementedErrorapplymarkerrR   test_reduce_series_numeric)r@   r   all_numeric_reductionsrO   requestrc   r[   s   &&&&& r   rg   +TestDecimalArray.test_reduce_series_numericX   sA    !%FF;;$$,?$@D%*4Pr   c                	   < TpVR9   d6   \         P                  P                  \        R7      pVP	                  V4       \
        SV `  WV4      # )r`   r^   )r`   ra   )rb   rc   rd   re   rf   rR   test_reduce_frame)r@   r   rh   rO   ri   r9   rc   r[   s   &&&&&  r   rl   "TestDecimalArray.test_reduce_frame^   sI    (((;;$$,?$@D%w(vNNr   c                	X    \         P                  ! V4      pV P                  W1VR 4       R# )      ?N)pdSeries_compare_other)r@   r   comparison_oprF   s   &&& r   test_compare_scalar$TestDecimalArray.test_compare_scalarf   s!    iioC}c:r   c           
     	j   \         P                  ! V4      p\        P                  P	                  ^4      P                  . RO\        V4      4      p\         P                  ! V4      V Uu. uF#  p\        P                  ! \        RV4      4      NK%  	  up,          pV P                  W1W&4       R# u upi )r8   g       @N)r      )rp   rq   rU   randomdefault_rngchoicelenr   r   powrr   )r@   r   rs   rF   alterirB   s   &&&    r   test_compare_array#TestDecimalArray.test_compare_arrayj   sz    iio		%%a(//
CIF		$"OA7??3sA;#?"OOC}< #Ps   *)B0c           	     	   Tp\         P                  ! V4      p\        P                  ! 4       pVP                  \        P
                  ,          pVP                  \        P                  ,          p^ VP                  \        P
                  &   ^ VP                  \        P                  &   \         P                  ! V Uu. uF  p\        V^d,          4      NK  	  up4      p	V P                  WCV	4       RV9  d   V P                  WCV^,          4       V P                  WC^ 4       V P                  WC^4       WeP                  \        P
                  &   WuP                  \        P                  &   R# u upi )r   modN)	rp   rq   r   
getcontexttrapsDivisionByZeroInvalidOperationintcheck_opname)
r@   r   all_arithmetic_operatorsr9   rF   contextdivbyzerotrapinvalidoptrapdrB   s
   &&&       r   test_arith_series_with_array-TestDecimalArray.test_arith_series_with_arrayr   s   *iio$$&g&<&<=g&>&>?01g,,-23g../ 		6A3q3w<67#.cC!G4#*#*0=g,,-2?g../ 7s   >E0c                	   < R p\         P                  ! \        VRR7      ;_uu_ 4        \        SV `  V4       RRR4       R#   + '       g   i     R# ; iz,ExtensionArray.fillna added a 'copy' keywordF)matchcheck_stacklevelN)rW   assert_produces_warningr   rR   test_fillna_framer@   r   msgr[   s   && r   r   "TestDecimalArray.test_fillna_frame   sF    <''#
 
 G%l3
 
 
 
   AA	c                	   < R p\         P                  ! \        VRR7      ;_uu_ 4        \        SV `  V4       RRR4       R#   + '       g   i     R# ; ir   )rW   r   DeprecationWarningrR   test_fillna_seriesr   s   && r   r   #TestDecimalArray.test_fillna_series   sF    <''cE
 
 G&|4
 
 
 
r   c                	   < R p\         P                  ! \        VR7      ;_uu_ 4        \        SV `  V4       RRR4       R#   + '       g   i     R# ; i)z4conversion from NoneType to Decimal is not supported)r   N)rb   r_   	TypeErrorrR   test_fillna_with_noner   s   && r   r   &TestDecimalArray.test_fillna_with_none   s8     E]]9C00G),7 1000s   AA	c                	   < R p\         P                  ! \        VRR7      ;_uu_ 4        \        SV `  V4       RRR4       R#   + '       g   i     R# ; ir   )rW   r   r   rR   test_fillna_limit_framer   s   && r   r   (TestDecimalArray.test_fillna_limit_frame   sF    <''cE
 
 G+L9
 
 
 
r   c                	   < R p\         P                  ! \        VRR7      ;_uu_ 4        \        SV `  V4       RRR4       R#   + '       g   i     R# ; ir   )rW   r   r   rR   test_fillna_limit_seriesr   s   && r   r   )TestDecimalArray.test_fillna_limit_series   sF    <''cE
 
 G,\:
 
 
 
r   zcopy keyword is missing)reasonc                	&   < \         SV `  V4       R # r   )rR   test_fillna_readonly)r@   r   r[   s   &&r   r   %TestDecimalArray.test_fillna_readonly   s    $\2r   c                	    \         P                  ! V4      pVP                  P                  \	        V4      9   g   Q hR \	        V4      9   g   Q hR# )z	Decimal: N)rp   rq   r   namerepr)r@   r   rF   s   && r   test_series_repr!TestDecimalArray.test_series_repr   s=     iiozz$s)+++d3i'''r   z%Inconsistent array-vs-scalar behaviorufuncc                	&   < \         SV `  W4       R # r   )rR   #test_unary_ufunc_dunder_equivalence)r@   r   r   r[   s   &&&r   r   4TestDecimalArray.test_unary_ufunc_dunder_equivalence   s     	3D@r   r   )__name__
__module____qualname____firstlineno__rC   rL   rS   rg   rl   rt   r   r   r   r   r   r   r   rb   rc   rd   r   r   parametrizerU   positivenegativeabsr   __static_attributes____classcell__)r[   s   @r   r6   r6   E   s    

5 5QO;=@,458:; [[783 93( [[EF[[Wr{{BKK&HIA J GAr   r6   c                 Z   \        \        P                  ! R 4      \        P                  ! R4      .4      p V P                  ^ R.R\        P                  ! R4      R7      p\        \        P                  ! R 4      \        P                  ! R4      .4      p\        P
                  ! W4       R# )r.   r/   Tz-1.0)
allow_fill
fill_valueNrw   )r   r   r   takerW   assert_extension_array_equalarrrY   rZ   s      r    test_take_na_value_other_decimalr      ss    
.0FG
HCXXq"g$7??6;RXSFW__U3W__V5LMNH##F5r   c                 >   \        4       p \        P                  ! . ROV R7      p\        \        P
                  ! ^ 4      \        P
                  ! ^4      \        P
                  ! ^4      .V R7      p\        P                  ! V4      p\        P                  ! W4       R# )r   r   N)r   rx   r8   )r   rp   rq   r   r   r   rW   assert_series_equal)r   rF   r   exps       r   6test_series_constructor_coerce_data_to_extension_dtyper      sh    NE
))IU
+C
		W__Q/1CDC ))C.C3$r   c                 h   \        \        P                  ! R 4      .4      p \        P                  ! V \        4       R7      p\        P                  ! V 4      p\        P                  ! W4       \        P                  ! V RR7      p\        P                  ! ^
.4      p\        P                  ! W4       R# )10.0r   int64N)r   r   r   rp   rq   r   rW   r   r   s      r   "test_series_constructor_with_dtyper      sr    
/0
1CYYs,.1Fyy~H6,YYs'*Fyy"H6,r   c                    \        \        P                  ! R 4      .4      p \        P                  ! RV /\        4       R7      p\        P                  ! RV /4      p\        P                  ! W4       \        \        P                  ! R 4      .4      p \        P                  ! RV /RR7      p\        P                  ! R^
./4      p\        P                  ! W4       R# )r   Ar   r   N)r   r   r   rp   	DataFramer   rW   assert_frame_equalr   s      r   %test_dataframe_constructor_with_dtyper      s    
/0
1C\\3*LN;F||S#J'H&+
/0
1C\\3*G4F||S2$K(H&+r   c                   \         P                  ! \        \        P                  ! ^4      .4      RR7      p\        P
                  ! 4       p^Vn        V ! V4      pVP                  \        V4      4      pV \         P                  J d
   VR,          pVP                  P                  P                  VP                  8X  g   Q hR# )r8   r1   )r   N)rp   rq   r   r   r   Contextprecastyper   r   r   r   )frame_or_seriesr   ctxrY   s   &   r   test_astype_dispatchesr      s    
 99\7??1#5"67cBD
//
CCH4 D[[c*+F",,&<<$$000r   c                  6    ] tR t^tRt]RRRR/R l4       tRtR# )DecimalArrayWithoutFromSequencez:Helper class for testing error handling in _from_sequence.r   NcopyFc               	    \        R 4      h)zFor the test)KeyError)clsscalarsr   r   s   &&$$r   _from_sequence.DecimalArrayWithoutFromSequence._from_sequence   s    ~&&r   r   )r   r   r   r   __doc__classmethodr   r   r   r   r   r   r      s%    D'd ' ' 'r   r   c                  &    ] tR tRt]R 4       tRtR# )DecimalArrayWithoutCoercioni  c                	(    V P                  VR R7      # )F)coerce_to_dtype)_create_method)r   ops   &&r   _create_arithmetic_method5DecimalArrayWithoutCoercion._create_arithmetic_method  s    !!"e!<<r   r   N)r   r   r   r   r   r   r   r   r   r   r   r     s    = =r   r   c                 0   \        \        P                  ! R 4      \        P                  ! R4      .4      p W ,           p\        P                  ! \        P                  ! R4      \        P                  ! R4      .RR7      p\
        P                  ! W4       R# )r.   r/   z4.0objectr   N)r   r   r   rU   arrayrW   assert_numpy_array_equalr   s      r   $test_scalar_ops_from_sequence_raisesr     sf     &wu'=wu?U&V
WCYFxx		!78H 1r   z#reverse, expected_div, expected_modFTc                    \        . RO4      pV '       d   \        ^V4      w  rEM\        V^4      w  rE\        V4      p\        V4      p\        P                  ! WA4       \        P                  ! WR4       R# )rx   N)rx   r8         )r	   divmodrW   r   )reverseexpected_divexpected_modr   divr   s   &&&   r   test_divmod_arrayr     s]     \
"C!S>S#q>l+Ll+L##C6##C6r   c                    V R ,          p\         P                  ! V\        ^^4      R7      p\        P                  ! V4      p\         P                  ! \        P                  ! V4      \        ^^4      R7      p\
        P                  ! W44       R# ):N   NindexN)rp   rq   r   rU   r   rW   r   )r   r1   srY   rZ   s   &    r   test_ufunc_fallbackr  +  sZ    RA
		!5A;'AVVAYFyy%1+6H6,r   c                     \        . RO4      p \        P                  ! V 4      p\        \        P                  ! V P                  4      4      p\        P
                  ! W4       R# rx   Nrx   r8   r   )r	   rU   r   _datarW   r   )r1   rY   rZ   s      r   test_array_ufuncr  3  s=    9AVVAYF"&&/*H##F5r   c                    \        . RO4      p \        P                  ! V 4      p\        P                  ! V4      p\        P                  ! \        \        P                  ! V P
                  4      4      4      p\        P                  ! W#4       R# r  )r	   rp   rq   rU   r   r  rW   r   r1   r  rY   rZ   s       r   test_array_ufunc_seriesr  :  sS    9A
		!AVVAYFyyBFF177O45H6,r   c                 L   \        . RO4      p \        P                  ! V 4      p\        P                  ! V\
        P                  ! ^4      4      p\        P                  ! \        P                  ! V \
        P                  ! ^4      4      4      p\        P                  ! W#4       R# r  )	r	   rp   rq   rU   addr   r   rW   r   r
  s       r   $test_array_ufunc_series_scalar_otherr  B  sb    9A
		!AVVAwq)*Fyy7??1#567H6,r   c                 >   \        . RO4      p \        P                  ! V 4      p\        P                  ! \        . RO4      4      p\        P                  ! W4      p\        P                  ! W4      p\
        P                  ! W24       \
        P                  ! WB4       R# )rx   Nr  )r8   r      )r	   rp   rq   rU   r  rW   r   )r1   r  rZ   r1r2s        r   test_array_ufunc_series_deferr  K  sb    9A
		!AyyI./H	B	B2(2(r   c            
        \        ^4      p \        P                  ! R. ROR. ROR\        V 4      /4      p\        P                  ! \        V ^ ,          V ^,          .4      4      pVP                  R4      R,          P                  R 4      p\        P                  ! W2RR7       VR,          P                  VR,          4      P                  R 4      p\        P                  ! W2RR7       \        P                  ! \        V ^ ,          V ^,          V ^,          .4      \        P                  P                  . RO4      R7      pVP                  RR.4      R,          P                  R	 4      p\        P                  ! W2RR7       VR,          P                  VR,          VR,          .4      P                  R
 4      p\        P                  ! W2RR7       \        P                  ! R^ ^.R\        V ^ ,          V ^,          .4      /4      pVP                  R4      P                  R 4      p\        P                  ! W2RR7       R# )r   id1id2decimalsc                (    V P                   ^ ,          # r   ilocr(   s   &r   r*   "test_groupby_agg.<locals>.<lambda>b  s    r   Fcheck_namesc                (    V P                   ^ ,          # r  r  r  s   &r   r*   r  d  s    QVVAYr   r   c                (    V P                   ^ ,          # r  r  r  s   &r   r*   r  l  s    !&&)r   c                (    V P                   ^ ,          # r  r  r  s   &r   r*   r  n  s    !&&QR)r   c                (    V P                   ^ ,          # r  r  r  s   &r   r*   r  s  s    QVVAYr   Nr   r   r   rx   rx   )r   rx   r   rx   rx   )r   r   )r   rx   )rx   rx   )r   rp   r   r   rq   r	   groupbyaggrW   r   
MultiIndexfrom_tuplesr   )r   dfrZ   rY   s       r   test_groupby_aggr+  W  s    Q<D		\RVEWX
B
 yyT!Wd1g$678HZZz*../BCF6?
^##BuI.223FGF6? yyDGT!Wd1g./mm''(@AH ZZ'
3778KLF6?
^##RY5	$:;??@STF6? ||UQFJ
DGTRSWCU8VWXHZZ""#67F&>r   c                   R  pV P                  \        RVRR7       \        ^4      p\        P                  ! R. ROR\        V4      /4      p\        P
                  ! \        V^ ,          V^,          ,           V^,          ,           V^,          V^,          ,           .4      4      pVP                  R4      R,          P                  R 4      p\        P                  ! WTRR7       \        P
                  ! \        V4      4      p\        P                  ! . RO\        P                  R7      pVP                  V4      P                  R	 4      p\        P                  ! WTRR7       R
# )c                V    \         P                  ! \         P                  ! V 4      4      # r   )rU   sumr   )r@   s   &r   DecimalArray__my_sum8test_groupby_agg_ea_method.<locals>.DecimalArray__my_sum{  s    vvbhhtn%%r   my_sumFraisingidr  c                6    V P                   P                  4       # r   valuesr1  r  s   &r   r*   ,test_groupby_agg_ea_method.<locals>.<lambda>  s    8Ir   r  r   c                6    V P                   P                  4       # r   r6  r  s   &r   r*   r8    s    ahhoo.?r   Nr$  )setattrr   r   rp   r   rq   r	   r&  r'  rW   r   rU   r   r   )monkeypatchr/  r   r*  rZ   rY   r  groupers   &       r   test_groupby_agg_ea_methodr=  w  s   & h0DeTQ<D	t_j,t:LM	NByyT!WtAw%6a%@$q'DQRGBS$TUVHZZj)--.IJF6?
		,t$%Ahhbhh7GYYw##$?@F6?r   c           
     f   RR lpV P                  \        RVRR7       \        ^
4      p\        P                  ! \        V4      4      p\        P
                  ! RVR\        \        V4      4      /4      pW3R8  ,           WCR8  ,           VP                  ^ ,           VP                  R	,           R # )
Nc                    \        R 4      h)z0tried to convert a DecimalArray to a numpy array)	Exception)r@   r   s   &&r   DecimalArray__array__;test_indexing_no_materialize.<locals>.DecimalArray__array__  s    JKKr   	__array__Fr2  r1   r0   ro   r   )r   r1   )	r:  r   r   rp   rq   r   r   r|   at)r;  rA  r   r  r*  s   &    r   test_indexing_no_materializerE    s    
L k3HRWXR=D
		,t$%A	sAsE#a&M2	3B #gJ3wKDDGEE&MMr   c                    \         P                  ! R 4      \         P                  ! R4      .p \        P                  ! \         P                  ! R4      \         P                  ! R4      .RR7      p\        P                  ! V RR7      pVP                  ^R7      p\        P                  ! W14       \        P                  ! V4      P                  ^R7      p\        P                  ! W14       R# )	z1.1111z2.2222z1.11z2.22r   r   r   )r  N)	r   r   rU   r   rp   to_numpyrW   r   rq   )r7  rZ   r1   rY   s       r   test_to_numpy_keywordrH    s    ooh')BCFxx		 '//&"9:(H 	y)AZZZ#F1YYq\""A".F1r   c                    \         P                  ! R \        P                  ! ^4      \        P                  ! ^4      ./RR7      p V P	                  \        4       4      p^ V P                  R&   \         P                  ! R \        P                  ! ^4      \        P                  ! ^4      ./\        4       R7      p\        P                  ! VP                  VP                  4       R# )r1   r   r   Nr%  )
rp   r   r   r   r   r   r  rW   assert_equalr7  )r*  df2rZ   s      r   test_array_copy_on_writerL    s    	sW__Q/1CDEX	VB
))LN
#CBGGDM||	wq!7??1#567|~H OOCJJ0r   )r   rx   rx   r8   )rx   r   rx   r   )r8   rx   r   r   )r   r   r8   r8   )5
__future__r   r   numpyrU   rb   pandas.errorsr   pandasrp   pandas._testing_testingrW   pandas.tests.extensionr   $pandas.tests.extension.decimal.arrayr   r   r   r	   fixturer   r   r   r   r"   r$   r,   r4   ExtensionTestsr6   r   r   r   r   r   r   r   _add_arithmetic_opsr   rc   r   r   r  r  r  r  r  r+  r=  rE  rH  rL  r   r   r   <module>rX     s   "    (   '    ' ' A A F F     2 2 4 4wAt** wAt6	%-
,1&'l '="A =  / / 12 )\<(4|*LM7	7-6--	)?@@**21r   