+
    yȇiA                     r    ^ RI Ht ^ RIt^ RIt^ RIHt ^ RIHtH	t	H
t
HtHt  ! R R4      t ! R R4      tR# )	    )	timedeltaN)IncompatibleFrequency)NaTPeriod	Timedelta	Timestampoffsetsc            
       ^  a  ] tR t^t o R tR tR tR tR t]	P                  P                  R. RO4      R 4       t]	P                  P                  RR	R
.4      ]	P                  P                  R. RO4      ]	P                  P                  R]P                  R3]P                  R3]P                   R3]P"                  R3.4      R 4       4       4       tR tR t]	P                  P                  R. RO4      R 4       t]	P                  P                  R. RO4      R 4       tR tR tRtV tR# )TestPeriodArithmeticc                `   \         P                  P                  R 4      pRP                  RR.4      p\        P
                  ! \        VR7      ;_uu_ 4        V^,            RRR4       Rp\        P
                  ! \        VR7      ;_uu_ 4        V\        ^4      ,            RRR4       \        P
                  ! \        VR7      ;_uu_ 4        V\        P                  ! ^4      ,            RRR4       R#   + '       g   i     L; i  + '       g   i     Lo; i  + '       g   i     R# ; i)ns|z)Python int too large to convert to C longzint too big to convertmatchNzvalue too large)
r   max	to_periodjoinpytestraisesOverflowErrorr   r	   Nano)selfpermsgs   &  z/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/scalar/period/test_arithmetic.pytest_add_overflow_raises-TestPeriodArithmetic.test_add_overflow_raises   s    mm%%d+hh;(
 ]]=44!G 5  ]]=44)A, 5]]=44',,q/! 54 54 54444s$   
C6D	D6D		D	D-	c                    \        R R^^R7      p\        R R^^R7      pV^,           V8X  g   Q h^V,           V8X  g   Q hR# )D  freqyearmonthdayNr   )r   per1per2s   &  r   test_period_add_integer,TestPeriodArithmetic.test_period_add_integer&   sF    3T:3T:ax44x4    c                   \        R R^^R7      p\        R R^^R7      pRP                  . RO4      p\        P                  ! \        VR7      ;_uu_ 4        VR,            RRR4       \        P                  ! \        VR7      ;_uu_ 4        RV,            RRR4       \        P                  ! \        VR7      ;_uu_ 4        W,            RRR4       R#   + '       g   i     L}; i  + '       g   i     LZ; i  + '       g   i     R# ; i)r   r    r!   r   r   strN)zunsupported operand type\(s\)zcan only concatenate strzmust be str, not Period)r   r   r   r   	TypeError)r   r'   r(   r   s   &   r   test_period_add_invalid,TestPeriodArithmetic.test_period_add_invalid,   s    3T:3T:hh
 ]]9C005L 1]]9C00DL 1]]9C00K 10	 1000000s$   
C
C(	C;C%	(C8	;D	c                *   \        R RR7      \        RRR7      r!W,
          pV^VP                  ,          8X  g   Q hRp\        P                  ! \        VR7      ;_uu_ 4        V\        RRR7      ,
           RRR4       R#   + '       g   i     R# ; i)	2011Yr"   2007z4Input has different freq=M from Period\(freq=Y-DEC\)r   z2007-01MNr   r"   r   r   r   )r   leftrightresultr   s   &    r   test_period_sub_period_annual2TestPeriodArithmetic.test_period_sub_period_annual?   si    V#.vC0HeUZZ'''E]]0<<6)#.. =<<<s   "BB	c                X   \        R RR7      p\        RRR7      pVP                  pW,
          R	V,          8X  g   Q hW!,
          ^V,          8X  g   Q hRp\        P                  ! \        VR7      ;_uu_ 4        V\        RRR7      ,
           RRR4       R#   + '       g   i     R# ; i)

2011-01-01r   r4   z
2011-01-15z0Input has different freq=M from Period\(freq=D\)r   z2011-02r6   Nir7   )r   r'   r(   offr   s   &    r   test_period_sub_period+TestPeriodArithmetic.test_period_sub_periodH   s    l-l-ii{cCi'''{b3h&&&A]]0<<6)#.. =<<<s   9BB)	nc                "   \        R V! V4      R7      p\        RV! V4      R7      p\        \        V4      VP                  P                  R7      \        \        V4      VP                  P                  R7      ,
          pWC,
          V8X  g   Q hR# )19910905r4   19920406N)r   r-   r"   base)r   tick_classesrB   p1p2expecteds   &&&   r   test_sub_n_gt_1_ticks*TestPeriodArithmetic.test_sub_n_gt_1_ticksT   sk     J\!_5J\!_5#b'5G"'',,9
 
 H$$$r+   	normalizeTFzoffset, kwd_namer$   startingMonthNweekdayc                   Ve   V^/M/ pRpRp\        Wa! W43/ VB R7      p\        Wq! W43/ VB R7      p	\        WyP                  P                  R7      \        WhP                  P                  R7      ,
          p
W,
          V
8X  g   Q hR # )NrD   rE   r4   )r   r"   rF   )r   offsetkwd_namerB   rM   kwdsp1_dp2_drH   rI   rJ   s   &&&&&      r   test_sub_n_gt_1_offsets,TestPeriodArithmetic.test_sub_n_gt_1_offsets`   s~     !) 4!}"Dva;d;<Dva;d;<$WW\\2VDww||5TTH$$$r+   c           
     z   R# EF9  p\        RVR7      p\        RVR7      pV\        P                  ! ^4      ,           V8X  g   Q h\        P                  ! ^4      V,           V8X  g   Q h\        P                  ! ^4      \        P                  ! ^4      \        P
                  ! 4       \        P                  ! RR4      \        R4      3 Fo  pRp\        P                  ! \        VR7      ;_uu_ 4        W$,            RRR4       \        P                  ! \        VR7      ;_uu_ 4        WB,            RRR4       Kq  	  EK<  	  R$ EF  p\        R	VR7      p\        R
VR7      pV\        P                  ! ^4      ,           V8X  g   Q h\        P                  ! ^4      V,           V8X  g   Q h\        RVR7      pV\        P                  ! ^4      ,           V8X  g   Q h\        P                  ! ^4      V,           V8X  g   Q hRP                  RR.4      p\        P                  ! ^4      \        P                  ! ^4      \        P
                  ! 4       \        P                  ! RR4      \        R4      3 Fm  p\        P                  ! \        VR7      ;_uu_ 4        W$,            RRR4       \        P                  ! \        VR7      ;_uu_ 4        WB,            RRR4       Ko  	  EK  	  R% EF  p\        RVR7      p\        RVR7      pV\        P                  ! ^4      ,           V8X  g   Q h\        P                  ! ^4      V,           V8X  g   Q h\        RVR7      pV\        P                  ! ^4      ,           V8X  g   Q h\        P                  ! ^4      V,           V8X  g   Q h\        RVR7      pV\        P                  ! ^R4      ,           V8X  g   Q h\        P                  ! ^R4      V,           V8X  g   Q h\        RVR7      pV\        P                  ! R&R4      ,           V8X  g   Q h\        P                  ! R&R4      V,           V8X  g   Q h\        RVR7      pV\        R'4      ,           V8X  g   Q h\        R'4      V,           V8X  g   Q h\        RVR7      pV\        ^0R7      ,           V8X  g   Q h\        ^0R7      V,           V8X  g   Q hRP                  RR.4      p\        P                  ! ^4      \        P                  ! ^4      \        P
                  ! 4       \        P                  ! ^R4      \        ^R7      3 Fm  p\        P                  ! \        VR7      ;_uu_ 4        W$,            RRR4       \        P                  ! \        VR7      ;_uu_ 4        WB,            RRR4       Ko  	  EK  	  R( EF  p\        RVR7      p\        RVR7      pV\        P                  ! ^4      ,           V8X  g   Q h\        P                  ! ^4      V,           V8X  g   Q h\        RVR7      pV\        P                  ! ^4      ,           V8X  g   Q h\        P                  ! ^4      V,           V8X  g   Q hRp\        RVR7      pV\        P                  ! ^R4      ,           V8X  g   Q h\        P                  ! ^R4      V,           V8X  g   Q h\        RVR7      pV\        P                  ! RR4      ,           V8X  g   Q h\        P                  ! RR4      V,           V8X  g   Q h\        RVR7      pV\        ^xR7      ,           V8X  g   Q h\        ^xR7      V,           V8X  g   Q h\        RVR7      pV\        ^^R 7      ,           V8X  g   Q h\        ^^R 7      V,           V8X  g   Q hRP                  RR.4      p\        P                  ! ^4      \        P                  ! ^4      \        P
                  ! 4       \        P                  ! R!R4      \        ^^R"7      3 Fm  p\        P                  ! \        VR7      ;_uu_ 4        W$,            RRR4       \        P                  ! \        VR7      ;_uu_ 4        WB,            RRR4       Ko  	  EK  	  R#   + '       g   i     EL; i  + '       g   i     EK  ; i  + '       g   i     EL+; i  + '       g   i     EKx  ; i  + '       g   i     EL; i  + '       g   i     EK  ; i  + '       g   i     L; i  + '       g   i     EK  ; i))r3   r2   r4   2013m  r   z<Input has different freq|Input cannot be converted to Periodr   N2011-03z2011-05z2012-03r   Input has different freq#Input cannot be converted to Period
2011-04-01z
2011-04-06
2011-04-02
2011-04-03  s
2011-03-30hoursh2011-04-01 09:00z2011-04-03 09:00z2011-04-01 12:00zcannot use operands with typesz2011-04-01 10:00z2011-04-01 11:00minutesz2011-04-05 12:00daysri     re   ri   r3   2Y3Yr6   2M3Mr   2D3DQ rf   2h3h)r   r	   YearEnd	YearBegin
MonthBeginMinutenptimedelta64r   r   r   r   MonthEndr   DayHour)r   r"   r   expr?   r   s   &     r   test_period_add_offset+TestPeriodArithmetic.test_period_add_offsetw   s0   %Dd+Cd+C++s222??1%+s222 !!!$""1% sC(# U]]#8DDI E]]#8DDI ED && &D.C.C))!,,333##A&,333.C))"--444##B'#-444((.9C !!!$""1% sC(# ]]#8DDI E]]#8DDI ED# &< &DD1CD1CQ'3...;;q>C'3...D1Cb))S000<<#c)S000D1C3//3666>>!S)C/3666D1C	3773>>>>>)S1C73>>>D1C2&#---R=3&#---D1C,,3332&,333((.9C !!!$""1% q#&# ]]#8DDI E]]#8DDI EDE &\ &D+$7C+$7CQ'3...;;q>C'3...+$7Ca(C///<<?S(C///2C+$7C3//3666>>!S)C/3666+$7Cc22c999>>$,s2c999+$7C3//3666S)C/3666+$7C3773>>>!S1C73>>>((.9C !!!$""1% tS)B/ ]]#8DDI E]]#8DDI EDG &c EDDDDD6 EDDDDDZ EDDDDDZ EDDDDs`   2	b	'	b.		c		c	-	c,	"	d 			d	>	d(	b+.c cc),c= dd%(d:c           
        R P                  RR.4      pR  F  p\        RVR7      pV\        P                  ! ^4      ,
          \        RVR7      8X  g   Q h\        P                  ! ^4      \        P
                  ! ^4      \        P                  ! 4       \        P                  ! RR4      \        R4      3 F8  p\        P                  ! \        VR7      ;_uu_ 4        W4,
           R	R	R	4       K:  	  K  	  R! EF  p\        R
VR7      pV\        P                  ! ^4      ,
          \        RVR7      8X  g   Q hV\        P                  ! ^4      ,
          \        RVR7      8X  g   Q h\        P                  ! ^4      \        P
                  ! ^4      \        P                  ! 4       \        P                  ! RR4      \        R4      3 F8  p\        P                  ! \        VR7      ;_uu_ 4        W4,
           R	R	R	4       K:  	  EK  	  R" EF  p\        RVR7      pV\        P                  ! ^4      ,
          \        RVR7      8X  g   Q hV\        P                  ! ^4      ,
          \        RVR7      8X  g   Q hV\        P                  ! ^R4      ,
          \        RVR7      8X  g   Q hV\        P                  ! R#R4      ,
          \        RVR7      8X  g   Q hV\        R$4      ,
          \        RVR7      8X  g   Q hV\        ^0R7      ,
          \        RVR7      8X  g   Q h\        P                  ! ^4      \        P
                  ! ^4      \        P                  ! 4       \        P                  ! ^R4      \        ^R7      3 F8  p\        P                  ! \        VR7      ;_uu_ 4        W4,
           R	R	R	4       K:  	  EK  	  R% EF  p\        RVR7      pV\        P                  ! ^4      ,
          \        RVR7      8X  g   Q hV\        P                  ! ^4      ,
          \        RVR7      8X  g   Q hV\        P                  ! ^R4      ,
          \        RVR7      8X  g   Q hV\        P                  ! RR4      ,
          \        RVR7      8X  g   Q hV\        ^xR7      ,
          \        RVR7      8X  g   Q hV\        ^^R7      ,
          \        RVR7      8X  g   Q h\        P                  ! ^4      \        P
                  ! ^4      \        P                  ! 4       \        P                  ! RR4      \        ^^R7      3 F8  p\        P                  ! \        VR7      ;_uu_ 4        W4,
           R	R	R	4       K:  	  EK  	  R	#   + '       g   i     EK  ; i  + '       g   i     EK  ; i  + '       g   i     EK>  ; i  + '       g   i     K  ; i)&r   r\   r]   r2   r4   2009rZ   r   r   Nr[   2011-01z2010-03r^   z
2011-03-27z
2011-03-31rc   ra   rb   r`   rd   rf   rg   z2011-03-30 09:00z2011-04-01 06:00z2011-04-01 08:00rh   z2011-04-01 07:00rj   z2011-03-28 06:00rl   rm   rn   rq   rt   rw   rx   ry   )r   r   r	   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   )r   r   r"   r   r?   s   &    r   test_period_sub_offset+TestPeriodArithmetic.test_period_sub_offset  s   hh*5
 &Dd+C++vf4/HHHH !!!$""1% sC(# ]]#8DDI ED	 & &D.C))!,,yt0LLLL))"--	1MMMM !!!$""1% sC(# ]]#8DDI ED &  &DD1CQ'6,T+JJJJb))VLt-LLLL3//6,T3RRRR	37764<    2&&D*IIII,,|$0OOOO !!!$""1% q#&# ]]#8DDI ED &* &D+$7CQ'62D4+PPPPa(F3ED,QQQQ3//6:LSW3XXXXc22f"7    3//6:LSW3XXXX3776"<   
 !!!$""1% tS)B/ ]]#8DDI ED &Q EDD EDD, EDD. EDDs0   	V	-	V	)	V.	(	W	VV+.W Wr"   c                    \        R VR7      p\        V,
          \        J g   Q hV\        ,
          \        J g   Q h\        V,           \        J g   Q hV\        ,           \        J g   Q hR# )r   r4   N)r   r   )r   r"   r   s   && r   test_period_addsub_nat+TestPeriodArithmetic.test_period_addsub_natZ  s\     YT* SyCSyC SyCSyCr+   unitc                J   \        R R4      p\        P                  ! RV4      pW#,           \        J g   Q hW2,           \        J g   Q hW#,
          \        J g   Q h\        P
                  ! \        RR7      ;_uu_ 4        W2,
           RRR4       R#   + '       g   i     R# ; i)z
2022-06-01r   r   zunsupported operandr   N)r   r   r   r   r   r   r.   )r   r   r   nats   &&  r   test_period_add_sub_td64_nat1TestPeriodArithmetic.test_period_add_sub_td64_natg  sw     \3'nnUD)yCyCyC]]9,ABBI CBBBs   >	BB"	c                `   \        R RR7      pV\        P                  ! 4       ,           p\        RRR7      pW#8X  g   Q hV\        P                  ! ^4      ,
          p\        RRR7      pW#8X  g   Q hRp\        P                  ! \
        VR7      ;_uu_ 4        V\        P                  ! ^4      ,            RRR4       \        P                  ! \
        VR7      ;_uu_ 4        V\        P                  ! ^4      ,
           RRR4       R#   + '       g   i     L\; i  + '       g   i     R# ; i)r^   r   r4   r_   rc   z-Input cannot be converted to Period\(freq=D\)r   N)r   r	   r   r   r   r   r   )r   r   r:   r   r   s   &    r   test_period_ops_offset+TestPeriodArithmetic.test_period_ops_offsett  s    \,w{{}$\,}}w{{1~%\,}}>]]0<<',,q/! = ]]0<<',,q/! =< =< =<<s   D	!D	D	D-	c                `   \        R 4      p\        R RR7      pRp\        P                  ! \        VR7      ;_uu_ 4        W,            RRR4       Rp\        P                  ! \        VR7      ;_uu_ 4        W!,            RRR4       R#   + '       g   i     LI; i  + '       g   i     R# ; i)2017r6   r4   z>unsupported operand type\(s\) for \+: 'Timestamp' and 'Period'r   Nz>unsupported operand type\(s\) for \+: 'Period' and 'Timestamp')r   r   r   r   r.   )r   tsr   r   s   &   r    test_period_add_timestamp_raises5TestPeriodArithmetic.test_period_add_timestamp_raises  ss    vV#&O]]9C00H 1 P]]9C00H 10	 10 100s   	B	6	B	B	B-	 )            rq   )r   usmsrb   m)__name__
__module____qualname____firstlineno__r   r)   r/   r;   r@   r   markparametrizerK   r	   r|   
QuarterEndr   WeekrV   r   r   r   r   r   r   __static_attributes____classdictcell____classdict__s   @r   r   r      sB    "( &/
/ [[S,/	% 0	% [[[4-8[[S,/[[__g&1t$\\9%		

% 0 9
%N`Qf [[V%67
  8
  [[V%AB
 C
"" r+   r   c                      a  ] tR tRt o R tR tR tR tR t]	P                  P                  RR]! RR	4      R
334      R 4       tRtV tR# )TestPeriodComparisonsi  c                    \        R R4      p\        RR4      pW8X  d   Q hW8w  g   Q hW8  g   Q hW8:  g   Q hW8  d   Q hW8  d   Q hR# )2000-01r6   z2000-02Nr&   )r   janfebs   &  r    test_period_comparison_same_freq6TestPeriodComparisons.test_period_comparison_same_freq  sX    Y$Y$:~zzyyzz9}:~:r+   c                    \        R R4      p\        R R4      pW8X  g   Q hW8  g   Q hW8:  g   Q hW8  d   Q hW8  d   Q hR# r   r6   Nr&   )r   r8   r9   s   &  r   3test_period_comparison_same_period_different_objectITestPeriodComparisons.test_period_comparison_same_period_different_object  sP    i%y#&}}}}}}<<<r+   c                |   \        R R4      p\        RR4      pW8X  d   Q hW8w  g   Q hRp\        P                  ! \        VR7      ;_uu_ 4        W8   RRR4       \        P                  ! \        VR7      ;_uu_ 4        W8*   RRR4       \        P                  ! \        VR7      ;_uu_ 4        W8   RRR4       \        P                  ! \        VR7      ;_uu_ 4        W8   RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Li; i  + '       g   i     R# ; i)r   r6   z
2012-01-01r   z0Input has different freq=D from Period\(freq=M\)r   N)r   r   r   r   )r   r   r%   r   s   &   r   &test_period_comparison_mismatched_freq<TestPeriodComparisons.test_period_comparison_mismatched_freq  s    Y$\3':~zzA]]0<<I =]]0<<J =]]0<<I =]]0<<J =< =<<<<<<<<s0   C1 D1D"D*1D	D	D'	*D;	c                   \        R R4      pV^8X  d   Q hV^8w  g   Q hRpRV RV 2pV^3^V33 F  w  rE\        P                  ! \        VR7      ;_uu_ 4        WE8   RRR4       \        P                  ! \        VR7      ;_uu_ 4        WE8   RRR4       \        P                  ! \        VR7      ;_uu_ 4        WE8   RRR4       \        P                  ! \        VR7      ;_uu_ 4        WE8*   RRR4       K  	  R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lm; i  + '       g   i     EK  ; i)r   r6   z'(Period|int)'z#not supported between instances of z and r   N)r   r   r   r.   )r   r   
int_or_perr   r8   r9   s   &     r   #test_period_comparison_invalid_type9TestPeriodComparisons.test_period_comparison_invalid_type  s    Y$!8|axx%
3J<uZLQ !Hq#h/KDy44 5y44 5y44 5y44 54 0444444444s0   D D<D&-D9 DD#&D69Ec                    \        R RR7      p\        R 4      p\        V3V\        3\        V3V\        33 F5  w  r4W48  d   Q hW48  d   Q hW48X  d   Q hW48w  g   Q hW48:  d   Q hW48  g   K5  Q h	  R# )r>   r   r4   N)r   r   r   )r   r   r   r8   r9   s   &    r   test_period_comparison_nat0TestPeriodComparisons.test_period_comparison_nat  s    \,|$ #J#J"II	
KD |##|##}$$= =}$$}$$
r+   zscalar, expectedr   r6   Tc                r    \         P                  ! V4      p\        R R4      pWC8H  VJ g   Q hW48H  VJ g   Q hR# r   )r   arrayr   )r   scalarrJ   zerodim_arrr   s   &&&  r   (test_period_comparison_numpy_zerodim_arr>TestPeriodComparisons.test_period_comparison_numpy_zerodim_arr  s@    
 hhv&Y$"x///"x///r+   r   N)r   F)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s   @r   r   r     sX     		  $%$ [[	fY,d340	0r+   r   )datetimer   numpyr   r   pandas._libs.tslibs.periodr   pandasr   r   r   r   r	   r   r   r   r+   r   <module>r      s4       <  DT0 T0r+   