+
    yȇi0                         ^ RI H t  ^ RIt^ RIt^ RIt^ RIHt ^ RIHt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 ! R R4      tR# )    )datetimeN)Pandas4Warning)	IndexNaT	TimedeltaTimedeltaIndex	Timestampnotnaoffsetstimedelta_rangeto_timedeltac            
          a  ] tR t^t o R tR t]P                  P                  R]	! R4      ]	! R4      ]
! R^^4      ]	! R4      P                  4       ]P                  ! R4      .4      R	 4       tR
tV tR# )TestGetItemc           	         R p\         P                  ! \        VR7      ;_uu_ 4        \        RRRRR7      pRRR4       XR,          P                  VP                  8X  g   Q hR#   + '       g   i     L6; i)	:'d' is deprecated and will be removed in a future version.match1d5dh
timebucketfreqnameN:   NN)tmassert_produces_warningr   r   r   )selfmsgtdis   &  }/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/indexes/timedeltas/test_indexing.pytest_getitem_slice_keeps_name)TestGetItem.test_getitem_slice_keeps_name   sT    J''cBB!$3\JC C2w||sxx''' CBs   A%%A5	c                   \        R RRRR7      pV3 EFR  pV^ ,          pV\        R 4      8X  g   Q hVR,          p\        R RRRR7      p\        P                  ! W44       VP                  VP                  8X  g   Q hVR,          p\        R RR	RR7      p\        P                  ! W44       VP                  VP                  8X  g   Q hVRR^1,          p\        R
RRRR7      p\        P                  ! W44       VP                  VP                  8X  g   Q hV^RR1,          p\        . RORRR7      p\        P                  ! W44       VP                  VP                  8X  d   EKS  Q h	  R# )1 day31 dayDidxr   :r      N5 day:r   
      z9 day2Dz12 dayz24 day3DNz-1Di)r*   4 day3 day2 dayr%   )r   r   r   assert_index_equalr   r   r   idx1r(   resultexpecteds   &    r!   test_getitemTestGetItem.test_getitem   s>   wsG6CVFYw////XF&wcNH!!&3;;(--///[F&wdOH!!&3;;(--///R]F&x5QH!!&3;;(--///BZF%=EPUH !!&3;;(--///1     keyz
1970-01-01z
1970-01-02i  z
1970-01-03r   c                    \        ^ ^
R7      p\        P                  ! \        \        P
                  ! \        V4      4      R7      ;_uu_ 4        VP                  V4       RRR4       R#   + '       g   i     R# ; i)r   periodsr   N)r   pytestraisesKeyErrorreescapereprget_loc)r   r<   r    s   && r!   test_timestamp_invalid_key&TestGetItem.test_timestamp_invalid_key<   sJ     a,]]8299T#Y+?@@KK A@@@s   A++A<	 N)__name__
__module____qualname____firstlineno__r"   r9   r@   markparametrizer	   r   to_datetime64np
datetime64rG   __static_attributes____classdictcell____classdict__s   @r!   r   r      ss     (0: [[l#l#T1a l#113MM% 	


r;   r   c                   8   a  ] tR t^Nt o R tR tR tR tRtV t	R# )
TestGetLocc                    \        . RO4      pV^,          P                  R4      pVP                  V4      pV^8X  g   Q hR# )0 daysmsNrZ   1 days2 days)r   as_unitrF   )r   r(   r<   locs   &   r!   test_get_loc_key_unit_mismatch)TestGetLoc.test_get_loc_key_unit_mismatchO   s8    9:!fnnT"kk#axxr;   c                f   \        . RO4      P                  R4      pVP                  R8X  g   Q hV^ ,          P                  R4      \	        ^4      ,           p\
        P                  ! \        RR7      ;_uu_ 4        VP                  V4       RRR4       W!9  g   Q hR#   + '       g   i     L; i)rZ   zm8[s]nsz(Timedelta\('0 days 00:00:00.000000001'\)r   Nr\   )	r   astypedtyper_   r   r@   rA   rB   rF   )r   r    r<   s   &  r!   +test_get_loc_key_unit_mismatch_not_castable6TestGetLoc.test_get_loc_key_unit_mismatch_not_castableU   s    9:AA'JyyG###!fnnT"Yq\1]]8+VWWKK X ~~ XWs   <B  B0	c                    \        . RO4      pVP                  V^,          P                  4       4      ^8X  g   Q hVP                  R 4      ^ 8X  g   Q hR# )rZ   Nr\   )r   rF   to_timedelta64)r   r(   s   & r!   test_get_locTestGetLoc.test_get_loc_   sL    9: {{3q60023q888 {{8$)))r;   c                   \        . RO4      pVP                  \        4      ^8X  g   Q hVP                  R4      ^8X  g   Q hVP                  \        R4      4      ^8X  g   Q hVP                  \        P
                  4      ^8X  g   Q hR# )1 days 01:00:00Nnan)rn   r   z2 days 01:00:00)r   rF   r   floatrQ   ro   )r   tidxs   & r!   test_get_loc_natTestGetLoc.test_get_loc_nath   sq    KL||C A%%%||D!Q&&&||E%L)Q...||BFF#q(((r;   rI   N)
rJ   rK   rL   rM   ra   rg   rk   rr   rS   rT   rU   s   @r!   rX   rX   N   s     *) )r;   rX   c                   &   a  ] tR t^qt o R tRtV tR# )TestGetIndexerc                T   \        . RO4      p\        P                  ! VP                  V4      \        P
                  ! . R	O\        P                  R7      4       \        . R
O4      p\        P                  ! VP                  VR4      \        P
                  ! . RO\        P                  R7      4       \        P                  ! VP                  VR4      \        P
                  ! . R	O\        P                  R7      4       \        P                  ! VP                  VR4      \        P
                  ! . RO\        P                  R7      4       VP                  VR\        R4      R7      p\        P                  ! V\        P
                  ! . RO\        P                  R7      4       R# )rZ   rf   padbackfillnearestz1 hour)	toleranceNr\   r   r   r,   )z-1 hourz12 hoursz1 day 1 hour)r0   r   r   )r   r   r   )r   r0   r   )r   r   assert_numpy_array_equalget_indexerrQ   arrayintpr   )r   r(   targetress   &   r!   test_get_indexerTestGetIndexer.test_get_indexerr   s
   9:
##OOC "((9BGG"D	
 EF
##OOFE*BHHZrww,O	
 	##OOFJ/)2771S	
 	##OOFI."''0R	
 oofi9X;NoO
##C*BGG)LMr;   rI   N)rJ   rK   rL   rM   r   rS   rT   rU   s   @r!   ru   ru   q   s     N Nr;   ru   c                   2   a  ] tR t^t o R tR tR tRtV tR# )	TestWherec                    \        R ^RRR7      p. ROp\        V^ ,          V^,          V^ ,          .RRR7      pVP                  W!RRR1,          4      p\        P                  ! WC4       R# )r%   r'   r(   r?   r   r   Nr   )TTFr0   )r   r   wherer   r4   )r   r    condr8   r7   s   &    r!   test_where_doesnt_retain_freq'TestWhere.test_where_doesnt_retain_freq   s\    gqsG"!3q63q63q6":ER4TrT+
f/r;   c                   \        R ^RRR7      pVR,          P                  4       p\        \        \        .VO4      p\	        V4      p\        \        P
                  \        P
                  .VO\        RR7      p\        V^ ,          \        4      '       g   Q hVP                  WTP                  4      p\        P                  ! Wv4       WA,           p\        V^ ,          V^,          .VO\        RR7      pVP                  WX4      p\        P                  ! Wv4       WA,           P                  R4      p	\        V	^ ,          V	^,          .VO\        RR7      pVP                  WY4      p\        P                  ! Wv4       Tp\        W.VO\        RR7      pVP                  WX4      p\        P                  ! Wv4       R# )r%   r'   r(   r   :r,   NNrf   r   N)r   tolistr   r   r
   _valueobject
isinstanceintr   asi8r   r4   	to_period)
r   fixed_now_tsr    taili2maskr8   r7   tspers
   &&        r!   test_where_invalid_dtypes#TestWhere.test_where_invalid_dtypes   s^   gqsG2w~~C$t$%Ry#**cjj848US(1+s++++4)
f/"Q%A..f5I4$
f/ ++C0#a&#a&040UK4%
f/"4UC4$
f/r;   c                $   \        R ^RRR7      p\        P                  ! . RO4      p\        P                  ! RR4      p\	        V^ ,          W3.\
        RR7      pV^,          VJ g   Q hVP                  W#4      p\        P                  ! WT4       R# )	r%   r'   r(   r   r   rd   r   N)TFF)	r   rQ   r   rR   r   r   r   r   r4   )r   r    r   dtnatr8   r7   s   &     r!   test_where_mismatched_nat#TestWhere.test_where_mismatched_nat   sv    gqsGxx,-eT*#a&%/vEJ{e###4'
f/r;   rI   N)	rJ   rK   rL   rM   r   r   r   rS   rT   rU   s   @r!   r   r      s     0060 0r;   r   c                   8   a  ] tR t^t o R tR tR tR tRtV t	R# )TestTakec                   \        R RRRR7      pV3 EF  pVP                  ^ .4      pV\        R 4      8X  g   Q hVP                  R.4      pV\        R4      8X  g   Q hVP                  . RO4      p\        R RRRR7      p\        P                  ! W44       VP
                  VP
                  8X  g   Q hVP                  . RO4      p\        R RRRR7      p\        P                  ! W44       VP
                  VP
                  8X  g   Q hVP                  . RO4      p\        RR	R
RR7      p\        P                  ! W44       VP
                  VP
                  8X  g   Q hVP                  . RO4      p\        . RORR7      p\        P                  ! W44       VP
                  e   Q hVP                  . RO4      p\        . RORR7      p\        P                  ! W44       VP
                  f   EK  Q h	  R# )r%   r&   r'   r(   r   r2   r*   r-   z8 dayr3   z-3Dr   Nr0   r|   )r   r,      )   r   r   )   r,   r)   )r1   r2   6 day)r,   r)   )z29 dayr2   r   )r   taker   r   r4   r   r   r5   s   &    r!   	test_takeTestTake.test_take   s   wsG6CXXqc]FYw////XXrd^FYx0000XXi(F&wcNH!!&3;;(--///XXi(F&wdOH!!&3;;(--///XXi(F&we%PH!!&3;;(--///XXi(F%&ANH!!&3;;&&&XXj)F%&BOH!!&3;;&&&= r;   c                *   \        R RRRR7      p. RO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)r%   r&   r'   r(   r   z1take\(\) got an unexpected keyword argument 'foo'r   )fooNz$the 'out' parameter is not supported)outz%the 'mode' parameter is not supportedclip)mode)r      r)   	   r+         r   )r   r@   rA   	TypeErrorr   
ValueError)r   r(   indicesr   s   &   r!   test_take_invalid_kwargs!TestTake.test_take_invalid_kwargs   s    gxcF-B]]9C00HHW!H$ 1 5]]:S11HHWH* 2 6]]:S11HHW6H* 21 10 21 211s#   C<C.=DC+	.C>	D	c                N   . ROp\        RRRRR7      p\        VRRR7      pVP                  . R	O4      pV. R	O,          pWE3 F^  p\        P                  ! Wc4       \        V\        4      '       g   Q hVP                  e   Q hVP                  VP                  8X  d   K^  Q h	  R# )
1day 02:00:001Dr-   r   r(   )startendr   r   Nr   )r   z1 day 04:00:00z1 day 10:00:00)r,   r   r+   )r   r   r   r   r4   r   r   r   )r   tdsr(   r8   taken1taken2takens   &      r!   test_take_equiv_getitem TestTake.test_take_equiv_getitem   s    CDd5I!#Du=*%Z%E!!%2e^4444::%%%::...	 &r;   c                r   \        . RORR7      pVP                  \        P                  ! . RO4      4      p\        . RORR7      p\        P
                  ! W#4       VP                  \        P                  ! . RO4      RR7      p\        . RORR7      p\        P
                  ! W#4       VP                  \        P                  ! . RO4      RRR7      p\        . RORR7      p\        P
                  ! W#4       Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  \        P                  ! . RO4      RR7       R	R	R	4       \        P                  ! \        VR7      ;_uu_ 4        VP                  \        P                  ! . RO4      RR7       R	R	R	4       R
p\        P                  ! \        VR7      ;_uu_ 4        VP                  \        P                  ! ^R.4      4       R	R	R	4       R	#   + '       g   i     L; i  + '       g   i     L{; i  + '       g   i     R	# ; i)r]   xxxr   T)
fill_valueF)
allow_fillr   zJWhen allow_fill=True and fill_value is not None, all indices must be >= -1r   Nz3index -5 is out of bounds for (axis 0 with )?size 3)r]   r^   3 days)r   r   r0   )r^   r]   r   )r^   r]   r   )r   r   r/   )r   r   r/   )
r   r   rQ   r   r   r4   r@   rA   r   
IndexError)r   r(   r7   r8   r   s   &    r!   test_take_fill_valueTestTake.test_take_fill_value   st   ;%H"((:./!"@uM
f/ "((:.4@!"=EJ
f/ "((:.5TR!"@uM
f/ Y 	 ]]:S11HHRXXj)dH; 2]]:S11HHRXXj)dH; 2 D]]:S11HHRXXq"g&' 21 2111 211s$   *G?5*H(H%?H	H"	%H6	rI   N)
rJ   rK   rL   rM   r   r   r   r   rS   rT   rU   s   @r!   r   r      s     "'H+ /( (r;   r   c                      a  ] tR tRt o ]P
                  ! . R	OR7      R 4       t]P
                  R 4       tR tR t	Rt
V tR# )
TestMaybeCastSliceBoundi  N)paramsc                    VP                   # )N)param)r   requests   &&r!   	monotonic!TestMaybeCastSliceBound.monotonic  s    }}r;   c                   \        R ^
R7      pVR8X  d   VRRR1,          pV# Vff   \        P                  ! ^
\        P                  R7      p\        P                  P                  ^4      P                  V4       VP                  V4      pV# )z1 Dayr>   
decreasingNrw   r0   )r   rQ   aranger   randomdefault_rngshuffler   )r   r   r    takers   &&  r!   r    TestMaybeCastSliceBound.tdi  su    gr2$dd)C
 
	 IIb0EII!!!$,,U3((5/C
r;   c                   R p\         P                  ! \        VR7      ;_uu_ 4        VP                  RRR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        VP	                  RRR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        VP                  RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     Le; i  + '       g   i     R# ; i)Rcannot do slice indexing on TimedeltaIndex with these indexers \[foo\] of type strr   r   left)sideN)r@   rA   r   _maybe_cast_slice_boundget_slice_bound
slice_locs)r   r    r   s   && r!   'test_maybe_cast_slice_bound_invalid_str?TestMaybeCastSliceBound.test_maybe_cast_slice_bound_invalid_str'  s    , 	 ]]9C00''F'; 1]]9C00F3 1]]9C00NN5$- 10	 1000000s#   C'C'C+C	C(	+C<	c                   V! \        ^
4      VR7      pRp\        P                  ! \        VR7      ;_uu_ 4        V! V4      R,           RRR4       \        P                  ! \        VR7      ;_uu_ 4        V! V4      RR  RRR4       \        P                  ! \        VR7      ;_uu_ 4        V! V4      R,           RRR4       \        P                  ! \        VR7      ;_uu_ 4        V! V4      V^ ,          R  RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lw; i  + '       g   i     R# ; i)	r+   )indexr   r   :zfooNNNr   :NzfooNr0   )ranger@   rA   r   )r   r    frame_or_series
indexer_slobjr   s   &&&&  r!   *test_slice_invalid_str_with_timedeltaindexBTestMaybeCastSliceBound.test_slice_invalid_str_with_timedeltaindex5  s     eBis3, 	 ]]9C00sOF# 1]]9C00sOE"% 1]]9C00sOF# 1]]9C00sOCFU+ 10 100000000s/   D6D.D-*E D	D*	-D=	 E	rI   )
increasingr   N)rJ   rK   rL   rM   r@   fixturer   r    r   r   rS   rT   rU   s   @r!   r   r     sH     ^^=> ? ^^ ., ,r;   r   c                   ,   a  ] tR tRt o R tR tRtV tR# )TestContainsiH  c                l    . RO. RO. RO. RO. RO3 F  p\        V4      pV^ ,          V9   d   K  Q h	  R# )r   N)r   r   r   )r   r   r0   )r   r0   r0   )00:01:00r   z00:02:00)r   r   z00:00:01)r   )r   valsr(   s   &  r!   test_contains_nonunique$TestContains.test_contains_nonuniqueI  s;     00
D !&Cq6S= =
r;   c                   R p\         P                  ! \        VR7      ;_uu_ 4        \        \	        ^4      RR7      \
        P                  ! ^4      ,           pRRR4       \        R\        R4      \        P                  3 F  pVX9  d   K  Q h	  \        \        .4      p\        R\        R4      \        P                  3 F  pW29   d   K  Q h	  R#   + '       g   i     L; i)r   r   d)unitNro   )r   r   r   r   r   r   Hourr   rp   rQ   ro   )r   r   tdvs   &   r!   test_containsTestContains.test_containsU  s     K''cBBeAhS1GLLOCB CtU5\2662AB;; 3 3% tU5\2662A7N7 3 CBs   2CC$	rI   N)rJ   rK   rL   rM   r   r   rS   rT   rU   s   @r!   r   r   H  s     
! r;   r   )r   rC   numpyrQ   r@   pandas.errorsr   pandasr   r   r   r   r	   r
   r   r   r   pandas._testing_testingr   r   rX   ru   r   r   r   r   rI   r;   r!   <module>r     sw     	   (
 
 
 4 4n )  )FN N,,0 ,0^^( ^(B., .,b r;   