+
    xȇi1                        R t ^ RIt^ RIt^ RIHtHt ^ RIHt ^ RI	H
t
HtHt ^ RIt^ RIHt ^ RIHt ^ RIHtHt ^ RIHtHtHtHtHtHtHtHt ^ RI H!t! ]! 4       ;'       d    ]'       * ;'       g    ]'       * t"]PF                  PI                  R	4      ]PF                  PI                  R
4      ]PF                  PI                  R4      .t%R t&R t'R t(]PR                  ! ]]]]]]]]]]].R7      R 4       t*]PR                  R 4       t+]PR                  R 4       t,]PR                  R 4       t-]PR                  R 4       t.]PR                  R 4       t/]PR                  R 4       t0]PR                  R 4       t1 ! R R]!Pd                  4      t3]PF                  Pi                  R]Pj                  ! RR.4      ]Pj                  ! ^^.4      ]Pj                  ! RR.4      .4      R 4       t6R# ) aj  
This file contains a minimal set of tests for compliance with the extension
array interface test suite, and should contain no other tests.
The test suite for the full functionality of the array is located in
`pandas/tests/arrays/`.

The tests in this file are inherited from the BaseExtensionTests, and only
minimal tweaks should be applied to get the tests passing (by overwriting a
parent method).

Additional tests should either be added to one of the BaseExtensionTests
classes (if they are relevant for the extension interface for all dtypes), or
be added to the array-specific tests in `pandas/tests/arrays/`.

N)IS64is_platform_windows)np_version_gt2)is_float_dtypeis_signed_integer_dtypeis_unsigned_integer_dtype)BooleanDtype)Float32DtypeFloat64Dtype)	Int8Dtype
Int16Dtype
Int32Dtype
Int64Dtype
UInt8DtypeUInt16DtypeUInt32DtypeUInt64Dtype)basez9ignore:invalid value encountered in divide:RuntimeWarningz)ignore:Mean of empty slice:RuntimeWarningz4ignore:overflow encountered in reduce:RuntimeWarningc            
      R    ^^^^\         P                  ^
^\         P                  ^c^d.
# )   pdNA     r/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/extension/test_masked.py	make_datar   ?   s%    q!Qr2ruub#66r   c            
      R    R RRR\         P                  RR\         P                  RR.
# )皙?皙?g333333?g?      ?g?g#@g      $@r   r   r   r   make_float_datar!   C   s%    c3sCTBBr   c                      R R.^,          \         P                  .,           R R.,           \         P                  .,           R R.,           # )TF)npnanr   r   r   make_bool_datar%   G   s9    %=1x'4-7266(BdE]RRr   )paramsc                 "    V P                  4       # N)param)requests   &r   dtyper+   K   s      ==?r   c                     V P                   R 8X  d   \        4       pM&V P                   R8X  d   \        4       pM
\        4       p\        P
                  ! WR7      # )fbr+   )kindr!   r%   r   r   array)r+   datas   & r   r2   r2   ^   s@    zzS 	s	{88D&&r   c                     V P                   R 8X  d-   \        P                  ! \        P                  ! ^
4      V R7      # \        P                  ! \        P                  ! ^
4      ^,          V R7      # )r.   r/   )r0   r   r1   r#   onesr/   s   &r   data_for_twosr5   i   sD    zzSxx51188BGGBK!O511r   c                 6   V P                   R 8X  d)   \        P                  ! \        P                  R.V R7      # V P                   R8X  d)   \        P                  ! \        P
                  R.V R7      # \        P                  ! \        P                  ^.V R7      # )r-   r   r/   r.   Tr0   r   r1   r   r#   r$   r/   s   &r   data_missingr8   p   se    zzSxxE22	s	xxe4488RUUAJe,,r   c                     V P                   R 8X  d   \        P                  ! . ROV R7      # V P                   R8X  d   \        P                  ! . ROV R7      # \        P                  ! . ROV R7      # )r-   r/   r.   )r   r           )TTF)r          )r0   r   r1   r/   s   &r   data_for_sortingr=   y   sN    zzSxxu55	s	xx+59988IU++r   c                 <   V P                   R 8X  d*   \        P                  ! R\        P                  R.V R7      # V P                   R8X  d*   \        P                  ! R\        P
                  R.V R7      # \        P                  ! ^\        P                  ^ .V R7      # )r-   r   r:   r/   r.   TFr7   r/   s   &r   data_missing_for_sortingr?      sm    zzSxxbeeS)77	s	xxrvvu-U;;88QqM//r   c                      R  # )c                 Z    V \         P                  J ;'       d    V\         P                  J # r(   r   )xys   &&r   <lambda>na_cmp.<locals>.<lambda>   s    RUU
11qBEEz1r   r   r   r   r   na_cmprF      s
     21r   c           
          V P                   R 8X  d   RpRpRpMV P                   R8X  d   RpRpTpM^p^ p^p\        P                  p\        P                  ! WWDW"W.V R7      # )r-   r   r:   r   r.   TFr/   )r0   r   r   r1   )r+   r.   acnas   &    r   data_for_groupingrK      sj    zzS	s		B88Q21.e<<r   c                   4  a a ] tR t^t oRt]P                  ! RR7      R 4       t]P                  P                  RRR.4      R 4       t
R	 tR
 tV3R lR ltV 3R ltV3R lR ltV3R lR ltV3R lR ltV3R lR ltV3R lR ltV 3R ltRtVtV ;t# )TestMaskedArraysbooleanT)autousec                .    VP                   '       d   Q hR # r(   )_supports_2d)selfr+   r*   s   &&&r   skip_if_doesnt_support_2d*TestMaskedArrays.skip_if_doesnt_support_2d   s     %%%%%%r   	na_actionNignorec                    VP                  R  VR7      pVP                  \        4       8X  d+   V'       d#   VP                  R\        P
                  R7      pMVP                  4       p\        P                  ! WE4       R# )c                     V # r(   r   )rB   s   &r   rD   +TestMaskedArrays.test_map.<locals>.<lambda>   s    Ar   rU   float64)r+   na_valueN)mapr+   r	   to_numpyr#   r$   tmassert_numpy_array_equal)rR   r8   rU   using_nan_is_naresultexpecteds   &&&&  r   test_mapTestMaskedArrays.test_map   s^    !!+!C/O#,,9rvv,NH#,,.H
##F5r   c                  a V^,          oVP                  V3R lRR7      pVP                  P                  R8X  d/   \        P                  ! R\
        P                  R.\        R7      pM]V'       g/   \        P                  ! S\
        P                  S.\        R7      pM'\        P                  ! S\        P                  S.4      p\        P                  ! W44       R# )r;   c                    < S# r(   r   )rB   zeros   &r   rD   <TestMaskedArrays.test_map_na_action_ignore.<locals>.<lambda>   s    r   rV   rZ   r.   Fr/   N)r]   r+   r0   r#   r1   r   r   objectr$   r_   r`   )rR   r?   ra   rb   rc   rh   s   &&&  @r   test_map_na_action_ignore*TestMaskedArrays.test_map_na_action_ignore   s    '*)--n-Q#))..#5xxu 5VDH xxruud 36BHxxrvvt 45H
##F5r   c                    \         P                  ! V4      pVP                  R 8X  d;   VP	                  R4      P                  R4      R9   d   \        # VR9   d   \        # R# R#   \         d    \         P                  ! T4      p Lpi ; i)r.   _rN)powtruedivfloordiv)__sub____rsub__)r_   	get_dtypeAttributeErrorr0   striplstripNotImplementedError	TypeError)rR   op_nameobjotherr+   s   &&&& r   _get_expected_exception(TestMaskedArrays._get_expected_exception   sz    	(LL%E
 ::}}S!((-1OO**33    	(LL'E	(s   A% %!B	B	c                    < V ^8  d   QhRS[ /# )r;   r{   )str)format__classdict__s   "r   __annotate__TestMaskedArrays.__annotate__   s      c r   c                    \         P                  ! V4      pTpVP                  R 8X  d   VR9   d   VP                  R4      pV# )r.   Int8)__mod____rmod__)r_   ru   r0   astype)rR   r{   r|   r}   pointwise_resultsdtyperc   s   &&&&&  r   _cast_pointwise_result'TestMaskedArrays._cast_pointwise_result   sC    c"#;;#  
 $??62r   c                   < VP                   P                  R 8X  d2   \        P                  P	                  RR7      pVP                  V4       \        SV `  W4       R# )r.   zInconsistency between floordiv and divmod; we raise for floordiv but not for divmod. This matches what we do for non-masked bool dtype.reasonN)r+   r0   pytestmarkxfailapplymarkersupertest_divmod_series_array)rR   r2   r5   r*   r   	__class__s   &&&& r   r   )TestMaskedArrays.test_divmod_series_array   sN    ::??c!;;$$) % D
 %(=r   c                @   < V ^8  d   QhRS[ P                  RS[RS[/# r;   serr{   returnr   Seriesr   bool)r   r   s   "r   r   r      s&      ryy 3 4 r   c                x    VR9   d3   VP                   P                  R8w  d   \        P                  ! RR7       R# )anyr.   z-Tested in tests/reductions/test_reductions.pyr   Tr   all)r+   r0   r   skiprR   r   r{   s   &&&r   _supports_reduction$TestMaskedArrays._supports_reduction   s)    n$3)>KKNOr   c                @   < V ^8  d   QhRS[ P                  RS[RS[/# r;   r   r{   skipnar   )r   r   s   "r   r   r      s&     1 1		 1C 1 1r   c                >   R pVP                   P                  R8X  d   VP                   P                  pM$VP                   P                  R8X  d
   VR9   d   RpVP                  4       P	                  V4      pVR8X  d"   \        W4      ! 4       p\        WR4      ! 4       pMg\        W4      ! VR7      p\        WR4      ! VR7      pV'       g<   VP                  4       P                  4       '       d   VR9  d   \        P                  p\        P                  ! Wg4       R# )	int64r-   r.   r   countr   Nminmaxr   )r+   r0   numpy_dtypedropnar   getattrisnar   r   r   r_   assert_almost_equal)rR   r   r{   r   	cmp_dtypealtrb   rc   s   &&&&    r   check_reduceTestMaskedArrays.check_reduce   s     	99>>S  		--IYY^^s".("	
 jjl!!),gS*,Fs,.HS*&9Fs,F;Hchhjnn..7.3P55
v0r   c                &   < V ^8  d   QhRS[ RS[/# )r;   r{   r   )r   r   )r   r   s   "r   r   r     s     & &# &t &r   c                L   \        VP                  4      '       d   VP                  P                  pV# VR	9   d   RpV# VR
9   d   VP                  P                  pV# VP                  R9   d   VP                  P                  pV# \        VP                  4      '       d9   \	        4       '       d   \
        '       d   V'       d   \        '       g   RpV# RpV# \        VP                  4      '       d9   \	        4       '       d   \
        '       d   V'       d   \        '       g   RpV# RpV# VP                  P                  R8X  dT   VR9   d   RpV# VR9   d7   \	        4       '       d   \
        '       d   V'       d   \        '       g   RMRpV# \        R4      h\        R4      h)meanFloat64Int64UInt64Int32UInt32r.   rN   znot supposed to reach this)r   medianvarstdskewkurtsem)r   r   )r   r   r   )sumprod)
r   r+   namer   r   r   r   r   r0   rz   )rR   arrr{   r   r   s   &&&& r   _get_expected_reduction_dtype.TestMaskedArrays._get_expected_reduction_dtype  s   #))$$		IH G OO!ID C &		I@ ? YY--		I< ; %SYY// ())>>t  6 / 	 6 + 'syy11 ())>>t  ( ! 	 (  YY^^s".(%	  O+ ,--~~V4  !	     <==899r   c                @   < V ^8  d   QhRS[ P                  RS[RS[/# r   r   )r   r   s   "r   r   r   5  s&      ")) c d r   c                    R # )Tr   r   s   &&&r   _supports_accumulation'TestMaskedArrays._supports_accumulation5  s    r   c                @   < V ^8  d   QhRS[ P                  RS[RS[/# r   r   )r   r   s   "r   r   r   8  s&     11 11BII 11 11T 11r   c           	        ^@p\         '       d   VP                  P                  ^8X  g   ^ pVP                  P                  P	                  R4      '       d   RV 2pMVP                  P                  P	                  R4      '       d   RV 2pMbVP                  P                  P	                  R4      '       d   VP                  pM*VP                  P
                  R8X  d   VR9   d   RpMRV 2pXR8X  d,   VR	8X  d%   V'       d   \        P                  ! R
V RV 24       VR8X  d   M3VR9   d   VP                  pMVR	8X  d   VR,          pM\        V R24      h\        W4      ! VR7      p\        P                  ! \        P                  ! \        VP                  R4      V4      ! VR7      RR7      4      p\        P                  V\        P                   ! V4      &   VP                  V4      p\"        P$                  ! Wg4       R# )@   UUIntIIntFr.   rN   Float32cumprodz4Float32 precision lead to large differences with op z and skipna=cumsum:N   Nz not supportedr   r[   r   r/   N)cummincummax)r   r   )is_windows_or_32bitr+   itemsizer   
startswithr0   r   r   ry   r   r   r   r1   r   r   r#   isnanr_   assert_series_equal)rR   r   r{   r   lengthexpected_dtyperb   rc   s   &&&&    r   check_accumulate!TestMaskedArrays.check_accumulate8  s     99%%*99>>$$S))#F8_NYY^^&&s++"6(^NYY^^&&s++ !YYNYY^^s"..!*#&vhY&7i+?FKKFwi P$X'
 h,, YYN	!c(C%	&@AA&f599HH

9-w7vF
 (*uu(#$??>2
v0r   c                &   < \         SV `  V4       R # r(   )r   8test_loc_setitem_with_expansion_preserves_ea_index_dtype)rR   r2   r*   r   s   &&&r   r   ITestMaskedArrays.test_loc_setitem_with_expansion_preserves_ea_index_dtypek  s    HNr   r   )__name__
__module____qualname____firstlineno___combine_le_expected_dtyper   fixturerS   r   parametrizerd   rk   r~   r   r   r   r   r   r   r   r   __static_attributes____classdictcell____classcell__)r   r   s   @@r   rM   rM      s     !*^^D!& "& [[[4*:;6 <6
6" > 
1 16& &P 11 11fO Or   rM   r   TFr    g       @c                    \         P                  \         P                  .pV P                  V4      pVP                  V P                  8X  g   Q h\        ;QJ d    R  V 4       F  '       d   K   RM	  RM! R  V 4       4      '       g   Q hR# )c              3   D   "   T F  q\         P                  J x  K  	  R # 5ir(   r   ).0rB   s   & r   	<genexpr>Ltest_cast_pointwise_result_all_na_respects_original_dtype.<locals>.<genexpr>w  s     *6aBEEz6s    FTN)r   r   r   r+   r   )r   valuesrb   s   &  r   9test_cast_pointwise_result_all_na_respects_original_dtyper   o  sb    
 eeRUU^F''/F<<399$$$3*6*333*6*****r   )7__doc__numpyr#   r   pandas.compatr   r   pandas.compat.numpyr   pandas.core.dtypes.commonr   r   r   pandasr   pandas._testing_testingr_   pandas.core.arrays.booleanr   pandas.core.arrays.floatingr	   r
   pandas.core.arrays.integerr   r   r   r   r   r   r   r   pandas.tests.extensionr   r   r   filterwarnings
pytestmarkr   r!   r%   r   r+   r2   r5   r8   r=   r?   rF   rK   ExtensionTestsrM   r   r1   r   r   r   r   <module>r     s      /    3	 	 	 (*,CC^1CPPD  KKC KKJK
KKUV
7CS  ' ' 2 2 - - , , 0 0 2 2
 = =$HOt** HOV 	BHHdE]#RXXq!f%5rxxc
7KL++r   