+
    yȇi,                        R t ^ RI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  ! R R4      t ! R R	4      t ! R
 R4      t ! R R4      t ! R R4      t ! R R4      t]P:                  P=                  R. RO. RO. RO.4      R 4       t]P:                  P=                  R]P@                  R]P@                  .]P@                  .]PB                  ! ^ ^.]PD                  R7      3]P@                  R]P@                  .]P@                  R.]PB                  ! . R O]PD                  R7      3]PB                  ! ]P@                  R]P@                  .]#R7      ]P@                  .]PB                  ! ^ ^.]PD                  R7      3]! R]].4      ].]PB                  ! ^^.]PD                  R7      3RRR]P@                  .]P@                  .]PB                  ! ^.]PD                  R7      3]PB                  ! R]P@                  ]$! R4      R.]#R7      ]! ]P@                  .]#R7      ]PB                  ! ^^.]PD                  R7      3.4      R 4       t%R t&R# )!aS  
test_indexing tests the following Index methods:
    __getitem__
    get_loc
    get_value
    __contains__
    take
    where
    get_indexer
    get_indexer_for
    slice_locs
    asof_locs

The corresponding tests.indexes.[index_type].test_indexing files
contain tests for the corresponding methods specific to those Index subclasses.
N)PY314)InvalidIndexError)is_float_dtype	is_scalar)NADatetimeIndexIndexIntervalIndex
MultiIndexNaTPeriodIndexTimedeltaIndexc                   8   a  ] tR t^*t o R tR tR tR tRtV t	R# )TestTakec                   ^^.pRp\         P                  ! \        VR7      ;_uu_ 4        VP                  V^R7       RRR4       Rp\         P                  ! \        VR7      ;_uu_ 4        VP                  W"R7       RRR4       Rp\         P                  ! \        VR7      ;_uu_ 4        VP                  VRR	7       RRR4       R#   + '       g   i     L; i  + '       g   i     Lg; i  + '       g   i     R# ; i)
   z1take\(\) got an unexpected keyword argument 'foo'match)fooNz$the 'out' parameter is not supported)outz%the 'mode' parameter is not supportedclip)mode)pytestraises	TypeErrortake
ValueError)selfindexindicesmsgs   &&  r/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/indexes/test_indexing.pytest_take_invalid_kwargs!TestTake.test_take_invalid_kwargs+   s    a&B]]9C00JJwAJ& 1 5]]:S11JJwJ, 2 6]]:S11JJwVJ, 21 10 21 211s#   C-C.C2C	C/	2D	c                   . ROp\        V4      ^8  d   \        P                  ! R4       VP                  V4      pW,          pVP	                  V4      '       g   Q h\        V\        \        \        34      '       g>   Rp\        P                  ! \        VR7      ;_uu_ 4        VP                   RRR4       R# R#   + '       g   i     R# ; i)   z1Test doesn't make sense since not enough elementsz*'(.*Index)' object has no attribute 'freq'r   N)r%             )lenr   skipr   equals
isinstancer   r   r   r   AttributeErrorfreq)r   r   indexerresultexpectedr    s   &&    r!   	test_takeTestTake.test_take:   s    u:>KKKLG$>}}X&&&&%-n!MNN?C~S99

 :9 O :99s   $B==C	c                    \        . RO4      p^pRp\        P                  ! \        VR7      ;_uu_ 4        VP	                  V4       RRR4       R#   + '       g   i     R# ; i)r'   z!Expected indices to be array-liker   Nr'   r   r(   r&   )r   r   r   r   r   )r   integer_indexscalar_indexr    s   &   r!   test_take_indexer_typeTestTake.test_take_indexer_typeI   sD    l+1]]9C00|, 1000s   AA#	c                    \        V4      ^ 8X  d   \        P                  ! R4       VP                  . RO4      pVP                  ^ ^ \        V4      ^,
          .4      p\        P
                  ! W#4       R# )r'   'Test doesn't make sense for empty indexN)r'   r'   )r)   r   r*   r   tmassert_index_equal)r   r   r0   r1   s   &&  r!   test_take_minus1_without_fill&TestTake.test_take_minus1_without_fillQ   sS    u:?KKABJ'::q!SZ!^45
f/     N)
__name__
__module____qualname____firstlineno__r"   r2   r8   r?   __static_attributes____classdictcell____classdict__s   @r!   r   r   *   s     --	0 	0rA   r   c                      a  ] tR t^]t o ]P
                  P                  R. RO^3. ROR3^ ^^]P                  ^.^3^ ^^]P                  ^.^3^ ^^]P                  .]P                  3^ ^^]P                  .]P                  3.4      R 4       t
]P
                  P                  R]! . RO4      R3]! . RO4      ^3]! ^ ^^]P                  .4      ^3]! ^ ^^]P                  .4      ^3]! ^ ^^]P                  .4      ]P                  3]! ^ ^^]P                  .4      ]P                  3]! . RO]P                  R7      ]P                  3]! . RO]P                  R7      ]P                  3]! . RO]P                  R7      ]P                  3]! . RO]P                  R7      ]P                  3.
4      R 4       t]P
                  P                  R^ R.4      R 4       t]P
                  P                  RR^.4      R	 4       tR
 tR tRtV tR# )TestContainsz	index,val2c                ,    \        V4      pW!9   g   Q hR # Nr   r   r   vals   &&&r!   test_index_contains TestContains.test_index_contains^   s     e||rA   dtypec                    W!9  g   Q hR # rO   rB   rQ   s   &&&r!   test_index_not_contains$TestContains.test_index_not_containsm   s    $ rA   rR   c                0    \        . RO4      pW9   g   Q hR# r'   Nr'   r   rM   rP   )r   rR   r   s   && r!   test_mixed_index_contains&TestContains.test_mixed_index_contains   s     k"||rA   1c                0    \        . RO4      pW!9  g   Q hR# r[   rP   rQ   s   &&&r!   test_mixed_index_not_contains*TestContains.test_mixed_index_not_contains   s     k"rA   c                    Tp\        V4      '       g   . ROM. ROp\        W2R7      p\        VP                  4      '       g   RV9  g   Q hRV9   g   Q h^V9   g   Q hR# RV9   g   Q hRV9  g   Q h^V9  g   Q hR# )r'   皙?rU         ?Nr5   )皙?rd   g@gffffff
@)r   r   rV   )r   any_real_numpy_dtyperV   datar   s   &&   r!   test_contains_with_float_index+TestContains.test_contains_with_float_index   s~    $#1%#8#8|>Rd(ekk**e###%<<::%<<e###E>!>rA   c                   \        V\        4      '       d   R # Rp\        P                  ! \        VR7      ;_uu_ 4        . V9    R R R 4       \
        '       d   RpMRpRP                  RRRR	R
V 2.4      p\        P                  ! \        VR7      ;_uu_ 4        / VP                  9    R R R 4       R #   + '       g   i     Lx; i  + '       g   i     R # ; i)Nzunhashable type: 'list'r   za container or iterableiterable|zunhashable type: 'dict'zmust be real number, not dictzan integer is requiredz\{\}z.pandas\._libs\.interval\.IntervalTree' is not )r,   r
   r   r   r   r   join_engine)r   r   r    container_or_iterables   &&  r!   &test_contains_requires_hashable_raises3TestContains.test_contains_requires_hashable_raises   s    eZ((']]9C00%K 1 5$=!$.!hh*0)A()+	
 ]]9C00%-- 10% 10$ 100s   B5C5C	C	rB   N)r'   r   r(   r\   )rC   rD   rE   rF   r   markparametrizenpinfnanrS   r   int64uint64rX   r]   ra   ri   rq   rG   rH   rI   s   @r!   rL   rL   ]   s    [[N#Arvvq!1%Arvvq!1%Arvv'Arvv'	


 [[9s#;#Aq!RVV$%q)Aq!RVV$%q)Aq!RVV$%rvv.Aq!RVV$%rvv. 9BHH-rvv69BHH-rvv69BII.79BII.7	
" #"  [[UQH- .
 [[US!H-  . 
"   rA   rL   c                   8   a  ] tR t^t o R tR tR tR tRtV t	R# )
TestGetLocc                    \         P                  ! \        R R7      ;_uu_ 4        VP                  ^ ^.4       RRR4       R#   + '       g   i     R# ; i)z[0, 1]r   N)r   r   r   get_loc)r   r   s   &&r!   test_get_loc_non_hashable$TestGetLoc.test_get_loc_non_hashable   s3    ]],H==MM1a&! >===s   AA	c                |   ^ RI Hp  ! R RV4      p\        VP                  4      '       d   Q h\        pRp\        V\        \        \        \        34      '       d	   \        pRp\        P                  ! WER7      ;_uu_ 4        VP                  VP                  4       RRR4       R#   + '       g   i     R# ; i)r'   )Enumc                       ] tR t^tRtRtR# )6TestGetLoc.test_get_loc_non_scalar_hashable.<locals>.Ex1rB   N)rC   rD   rE   rF   X1rG   rB   rA   r!   Er      s    BrA   r   z<E.X1: 'x1'>zE.X1r   N)enumr   r   r   KeyErrorr,   r   r   r   r	   r   r   r   r}   )r   r   r   r   excr    s   &&    r!    test_get_loc_non_scalar_hashable+TestGetLoc.test_get_loc_non_scalar_hashable   s    	 	 QTT??""	
 
 $CC]]3**MM!$$ +***s   B**B;	c                0   \         p\        V\        \        \        \
        \        34      '       d   \        p\        P                  ! VR R7      ;_uu_ 4        VP                  R \        ^4       4       4       RRR4       R#   + '       g   i     R# ; i)zgenerator objectr   c              3   $   "   T F  qx  K  	  R # 5irO   rB   ).0xs   & r!   	<genexpr>4TestGetLoc.test_get_loc_generator.<locals>.<genexpr>   s     .X!Xs   N)r   r,   r   r   r   r	   r
   r   r   r   r}   range)r   r   r   s   && r!   test_get_loc_generator!TestGetLoc.test_get_loc_generator   si    	
 	
 $C]]3&899MM.U1X.. :999s   "BB	c                    \        ^^\        \        .RR7      pVP                  \        4      p\        P                  ! . RO4      p\
        P                  ! W#4       R# )r   Int64rU   N)FFTT)r   r   r}   ru   arrayr=   assert_numpy_array_equalr   idxr0   r1   s   &   r!   !test_get_loc_masked_duplicated_na,TestGetLoc.test_get_loc_masked_duplicated_na   s@    Q2rN'2R8867
##F5rA   rB   N)
rC   rD   rE   rF   r~   r   r   r   rG   rH   rI   s   @r!   r{   r{      s     " 4/$6 6rA   r{   c                   2   a  ] tR t^t o R tR tR tRtV tR# )TestGetIndexerc                (   VP                   '       dY   \        P                  ! VP                  \        P                  R 7      pVP                  V4      p\        P                  ! W#4       M@Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  V4       RRR4       \        P                  ! \        RR7      ;_uu_ 4        VP                  VRR7       RRR4       R#   + '       g   i     LR; i  + '       g   i     R# ; i)rU   8Reindexing only valid with uniquely valued Index objectsr   NzInvalid fill methodinvalid)method)_index_as_uniqueru   arangesizeintpget_indexerr=   r   r   r   r   r   )r   r   r1   actualr    s   &&   r!   test_get_indexer_base$TestGetIndexer.test_get_indexer_base   s    !!!yy277;H&&u-F''9LC0<<!!%( = ]]:-BCCeI6 DC =< DCCs   C-D -C=	 D	c                P   VP                   '       d]   VP                  VR ,          4      p\        V\        P                  4      '       g   Q hVP
                  \        P                  8X  g   Q hMGRp\        P                  ! \        VR7      ;_uu_ 4        VP                  VR ,          4       RRR4       VP                  VR ,          4      w  r$\        V\        P                  4      '       g   Q hVP
                  \        P                  8X  g   Q hR#   + '       g   i     Lo; i):r'   r(   Nr   r   N)r   r   r,   ru   ndarrayrV   r   r   r   r   get_indexer_non_unique)r   r   r/   r    _s   &&   r!   test_get_indexer_consistency+TestGetIndexer.test_get_indexer_consistency   s     !!!''c
3Ggrzz2222==BGG+++LC0<<!!%*- = 11%*=
'2::....}}''' =<s   DD%	c                    \        ^^\        \        .RR7      pVP                  \        ^\        .RR7      4      p\        P                  ! . ROVP
                  R7      p\        P                  ! W#4       R# )r   r   rU   N)r'   r(   r&   )r   r   get_indexer_forru   r   rV   r=   r   r   s   &   r!   %test_get_indexer_masked_duplicated_na4TestGetIndexer.test_get_indexer_masked_duplicated_na  sS    Q2rN'2$$UAr7'%BC88IV\\:
##F5rA   rB   N)	rC   rD   rE   rF   r   r   r   rG   rH   rI   s   @r!   r   r      s     7( 6 6rA   r   c                   &   a  ] tR tRt o R tRtV tR# )TestConvertSliceIndexeri  c                   \        R R R4      p\        V\        4      '       dD   Rp\        P                  ! \
        VR7      ;_uu_ 4        VP                  VR4       R R R 4       R # Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  VR4       R R R 4       R #   + '       g   i     R # ; i  + '       g   i     R # ; i)Nr   zClabel-based slicing with step!=1 is not supported for IntervalIndexr   locz7'>=' not supported between instances of 'str' and 'int')slicer,   r	   r   r   r   _convert_slice_indexerr   )r   r   keyr    s   &&  r!   test_convert_almost_null_slice6TestConvertSliceIndexer.test_convert_almost_null_slice  s     D$&e]++WCz55,,S%8 65 LCy44,,S%8 54	 655 544s   
B*B>*B;	>C	rB   N)rC   rD   rE   rF   r   rG   rH   rI   s   @r!   r   r     s     9 9rA   r   c                   &   a  ] tR tRt o R tRtV tR# )TestPutmaski&  c           	     $   \        V4      '       g   \        P                  ! R 4       V^ ,          pRp\        P                  ! \        VR7      ;_uu_ 4        VP                  \        P                  ! \        V4      ^,           \        P                  4      V4       RRR4       \        P                  ! \        VR7      ;_uu_ 4        VP                  \        P                  ! \        V4      ^,
          \        P                  4      V4       RRR4       \        P                  ! \        VR7      ;_uu_ 4        VP                  RV4       RRR4       R#   + '       g   i     L; i  + '       g   i     Ld; i  + '       g   i     R# ; i)r;   z,putmask: mask and data must be the same sizer   Nr   )	r)   r   r*   r   r   putmaskru   onesbool_)r   r   fillr    s   &&  r!   test_putmask_with_wrong_mask(TestPutmask.test_putmask_with_wrong_mask'  s    5zzKKABQx<]]:S11MM"''#e*q."((;TB 2 ]]:S11MM"''#e*q."((;TB 2 ]]:S11MM%& 21 21 21 211s&   AE	AE+;E>E(	+E;	>F	rB   N)rC   rD   rE   rF   r   rG   rH   rI   s   @r!   r   r   &  s     ' 'rA   r   r   abc                     \        V 4      p R p\        P                  ! \        VR7      ;_uu_ 4        V R,           RRR4       R#   + '       g   i     R# ; i)z,Indexing with a float is no longer supportedr   re   N)r   r   r   
IndexError)r   r    s   & r!   test_getitem_deprecated_floatr   9  s9     *C
8C	z	-	-C 
.	-	-	-s   
AA	zidx,target,expectedvar1rU   z
2020-08-05NaNc                 j    \        V 4      pVP                  V4      p\        P                  ! WB4       R # rO   )r   r   r=   r   )r   targetr1   axisr   s   &&&  r!   )test_get_indexer_non_unique_multiple_nansr   B  s+    : :D!!&)F1rA   c                 V   \        R R.4      p\        ^V .RR7      pVP                  V4      w  r4\        P                  ! V\        P
                  ! ^ R.\        P                  R7      4       \        P                  ! V\        P
                  ! ^.\        P                  R7      4       R# )re   g       @objectrU   Nr<   )r   r   r=   r   ru   r   r   )nulls_fixturer   r   
result_idxresult_missings   &    r!   7test_get_indexer_non_unique_nans_in_object_dtype_targetr   d  sx    
c

CA}%X6F!$!;!;F!CJ
BHHaWBGG,LM!BGG0LMrA   )r   r(   r&   )rf   g?g333333?)r   r   c)r'   r(   r   )'__doc__numpyru   r   pandas.compatr   pandas.errorsr   pandas.core.dtypes.commonr   r   pandasr   r   r   r	   r
   r   r   r   pandas._testing_testingr=   r   rL   r{   r   r   r   rs   rt   r   rw   r   r   r   floatr   r   rB   rA   r!   <module>r      s&  "    +
	 	 	 00 00fW  W t66 66r#6 #6L9 9 ' '& O_ MN O 
&&&"&&	!BFF8RXXq!fBGG-LMVVVRVV$VVVHHYbgg.	
 HHbfffbff-V<VVHHHaV277+	
 <c23EHHaV277+	

 sC	 266(BHHaS,HIHHc2665<5VD266(&)HHaV277+	
%62762NrA   