+
    yȇi{                        ^ RI t ^ RIt^ RIt^ RIHtHtHtHt ^ RI	t
^ RI	HtHtHtHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHtHtHt ]
P6                  P9                  ^4      ]
P6                  P;                  ^4      ]
P6                  P=                  4       .t]P@                  ! ]! ^R7      PC                  4       ]PD                  ! ^R4      ]! ^R	7      .]OR
7      R 4       t#]P@                  ! ]PD                  ! RR4      ]! RR7      PC                  4       ]! RR7      .]OR
7      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 R4      t+ ! R R4      t,R# )     N)IncompatibleFrequencyPeriod	Timestamp	to_offset)PeriodIndexSeries	TimedeltaTimedeltaIndexperiod_range)ops)TimedeltaArray)assert_invalid_addsub_typeassert_invalid_comparisonget_upcast_box)minutess)seconds)paramsc                    V P                   # )zd
Several timedelta-like and DateOffset instances that are _not_
compatible with Hourly frequencies.
paramrequests   &s/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/arithmetic/test_period.py
not_hourlyr   (        ==    im  Ddaysc                    V P                   # )zo
Several timedelta-like and DateOffset instances that are _not_
compatible with Monthly or Annual frequencies.
r   r   s   &r   mismatched_freqr"   8   r   r   c                   &  a  ] tR t^Lt o ]P
                  P                  RR]! RRR7      .4      R 4       tR t	]P
                  P                  RR]
! R	4      ]! ^R
7      ^	RRRR.4      R 4       t]P
                  P                  R]P                  ! R^R7      P                  ]P                   ! R^R7      P                  ]P$                  ! ^4      ]P$                  ! ^4      P'                  ]P(                  4      ]! ]! ^4      4      . RO]P$                  ! RR4      ]P$                  ! RR4      P'                  ]4      ]P0                  ! . RO4      .	4      R 4       t]P
                  P                  R]]P                  R .4      R 4       tRtV tR# )TestPeriodArrayLikeComparisonsother2017r   freqc                    \        . RORR7      p\        P                  ! W24      p\        W1R4      p\        P
                  ! . RO4      p\        P                  ! WT4      pW18H  p\        P                  ! We4       R# )r&   r   r'   TN)r&   r&   2018TTFr   tmbox_expectedr   nparrayassert_equal)selfr%   box_with_arrayidxxboxexpectedresults   &&&    r   test_eq_scalar-TestPeriodArrayLikeComparisons.test_eq_scalarQ   sY    2=ooc2c$/88/0??82
)r   c                J   \        R ^R7      p\        P                  ! VP                  4       ^ ,          4      p\        P
                  ! W!4      p\        W#R4      pW#8*  p\        P                  ! . RO4      p\        P
                  ! Wd4      p\        P                  ! WV4       R# )2000periodsTNTFFF)r   r/   r0   to_numpyr-   r.   r   r1   )r2   r3   pir%   r5   r7   r6   s   &&     r   test_compare_zerodim3TestPeriodArrayLikeComparisons.test_compare_zerodim^   ss     &!,q)*__R0b.8878??82
)r   scalarfooz
2021-01-01r   g      #@  FNc                d    \        R ^R7      p\        P                  ! W14      p\        WBV4       R# r;   r<   Nr   r-   r.   r   )r2   r3   rC   r@   parrs   &&&  r   test_compare_invalid_scalar:TestPeriodArrayLikeComparisons.test_compare_invalid_scalarl   s(      &!,r2!$?r   r;   r<   1Di  c                d    \        R ^R7      p\        P                  ! W14      p\        WBV4       R# rG   rH   )r2   r3   r%   r@   rI   s   &&&  r   test_compare_invalid_listlike<TestPeriodArrayLikeComparisons.test_compare_invalid_listlike   s(      &!,r2!$~>r   	other_boxc                ,    V P                  \        4      # N)astypeobjectxs   &r   <lambda>'TestPeriodArrayLikeComparisons.<lambda>   s    QXXfEUr   c                   \        R ^R7      p\        P                  ! W14      pV! V4      p\        WER4      p\        P
                  ! . RO4      p\        P                  ! Wv4      pWE8H  p\        P                  ! W4       WE8*  p\        P                  ! W4       WE8  p\        P                  ! W4       WE8g  p\        P                  ! W( 4       WE8  p\        P                  ! W( 4       WE8  p\        P                  ! W( 4       V! VRRR1,          4      p\        P
                  ! . RO4      p\        P                  ! Wv4      pWE8H  p\        P                  ! W4       \        P
                  ! . RO4      p\        P                  ! Wv4      pWE8*  p\        P                  ! W4       \        P
                  ! . RO4      p\        P                  ! Wv4      pWE8  p\        P                  ! W4       \        P
                  ! . R	O4      p\        P                  ! Wv4      pWE8g  p\        P                  ! W4       \        P
                  ! . R
O4      p\        P                  ! Wv4      pWE8  p\        P                  ! W4       \        P
                  ! . RO4      p\        P                  ! Wv4      pWE8  p\        P                  ! W4       R# )r;   r<   TN)TTTTT)FFTFF)TTTFF)FFTTT)TTFTT)TTFFF)FFFTT)r   r-   r.   r   r/   r0   r1   )	r2   r3   rP   r@   rI   r%   r5   r6   r7   s	   &&&      r   test_compare_object_dtype8TestPeriodArrayLikeComparisons.test_compare_object_dtype   s   &!,r2"d4088:;??82
)
)
)
	*
	*
	*"TrT(#88>???82
)88<=??82
)88<=??82
)88;<??82
)88=>??82
)88=>??82
)r    )rE   i  i  i  )__name__
__module____qualname____firstlineno__pytestmarkparametrizer   r8   rA   r   r	   rJ   pd
date_ranger0   timedelta_ranger/   arangerS   float64listrangerT   IndexrN   r[   __static_attributes____classdictcell____classdict__s   @r   r$   r$   L   sy    
 [[Wvvf3/G&HI
* J
** [[l#1		
@@ [[MM&!,22tQ/55IIaLIIaL

+qN$IIdD!IIdD!((0HH-.	
??
 [[[4;U*VW6* X6*r   r$   c                     a  ] tR t^t o R tR t]P                  P                  R. RO4      R 4       t	]P                  P                  R. RO4      R 4       t
]P                  P                  R. RO4      R 4       t]P                  P                  R. RO4      R 4       t]P                  P                  R. RO4      R 4       t]P                  P                  R	]R
.4      R 4       tRtV tR
# )TestPeriodIndexComparisonsc                   \        R ^RR7      pV^
,          pW8  pVP                  VP                  ^
,          8  p\        P                  ! W44       VP                  P	                  ^
^4      V8  p\        P                  ! W4P	                  ^
^4      4       V\
        P                  ! V4      8  p\        P                  ! W44       R# )2007-01Mr=   r(   N)r   valuesr-   assert_numpy_array_equalreshaper/   r0   )r2   r4   perr7   exps   &    r   test_pi_cmp_period-TestPeriodIndexComparisons.test_pi_cmp_period   s    9bs;"gjj3::b>)
##F0 ##B*S0
##FKKA,>? rxx}$
##F0r   c                   \        R ^
RR7      pV^,          pV Uu. uF  qDV8  NK	  	  pp\        P                  ! W!4      p\        WcR4      p\        P                  ! WW4      pWc8  p\        P                  ! W4       V^,          pWc8  pV Uu. uF  qDV8  NK	  	  pp\        P                  ! WW4      p\        P                  ! W4       R# u upi u upi )z
2000-01-01r   rv   TN)r   r-   r.   r   r1   )	r2   r3   r@   valrV   r6   serr5   r7   s	   &&       r   test_parr_cmp_period_scalar27TestPeriodIndexComparisons.test_parr_cmp_period_scalar2   s    ,=e%'(RGR(oob1c-??82
)e%'(RGR(??82
) ) )s   CCr(   c                   \        . ROVR7      p\        P                  ! W24      p\        RVR7      p\	        W4R4      p\
        P                  ! . RO4      p\        P                  ! We4      p\        P                  ! W48H  V4       \        P                  ! WC8H  V4       \
        P                  ! . RO4      p\        P                  ! We4      p\        P                  ! W48g  V4       \        P                  ! WC8g  V4       \
        P                  ! . RO4      p\        P                  ! We4      p\        P                  ! W48  V4       \        P                  ! WC8  V4       \
        P                  ! . R	O4      p\        P                  ! We4      p\        P                  ! W48  V4       \        P                  ! WC8  V4       \
        P                  ! . R
O4      p\        P                  ! We4      p\        P                  ! W48  V4       \        P                  ! WC8*  V4       \
        P                  ! . RO4      p\        P                  ! We4      p\        P                  ! W48*  V4       \        P                  ! WC8  V4       R# )2011-012011-02r'   TNr   r   2011-032011-04FTFFTFTT)FFTTr>   )FTTT)TTFF)r   r-   r.   r   r   r/   r0   r1   )r2   r(   r3   baserz   r5   r{   s   &&&    r   test_parr_cmp_period_scalar6TestPeriodIndexComparisons.test_parr_cmp_period_scalar   s    GdSt4YT*d.hh23ooc(
S)
S)hh01ooc(
S)
S)hh12ooc(

C(

C(hh23ooc(

C(

C(hh01ooc(
S)
S)hh12ooc(
S)
S)r   c                   \        . ROVR7      p\        P                  ! W24      p\        . ROVR7      p\        W4R4      p\        P
                  ! . RO4      p\        P                  ! We4      p\        P                  ! W48H  V4       \        P
                  ! . RO4      p\        P                  ! We4      p\        P                  ! W48g  V4       \        P
                  ! . RO4      p\        P                  ! We4      p\        P                  ! W48  V4       \        P
                  ! . R	O4      p\        P                  ! We4      p\        P                  ! W48  V4       \        P
                  ! . R
O4      p\        P                  ! We4      p\        P                  ! W48  V4       \        P
                  ! . RO4      p\        P                  ! We4      p\        P                  ! W48*  V4       R# )r   r'   TNr   )r   r   r   2011-05FFTFTTFTr   TFFTFTTFr   r,   )r2   r(   r3   r   r4   r5   r{   s   &&&    r   test_parr_cmp_pi+TestPeriodIndexComparisons.test_parr_cmp_pi  sH    GdSt4 FTRd.hh23ooc(
S)hh01ooc(
S)hh23ooc(

C(hh12ooc(

C(hh12ooc(
S)hh01ooc(
S)r   c                   \        . ROVR7      p\        P                  ! W24      pRV R2p\        P                  ! \
        VR7      ;_uu_ 4        V\        RRR7      8*   RRR4       \        P                  ! \
        VR7      ;_uu_ 4        \        RRR7      V8   RRR4       \        . RORR7      pRpV\        P                  \        P                  39   d   TMTp\        P                  ! \
        VR7      ;_uu_ 4        W58*   RRR4       RV R2p\        P                  ! \
        VR7      ;_uu_ 4        V\        RR	R7      8*   RRR4       \        P                  ! \
        VR7      ;_uu_ 4        \        RR	R7      V8   RRR4       \        . ROR	R7      pR
pV\        P                  \        P                  39   d   TMTp\        P                  ! \
        VR7      ;_uu_ 4        W58*   RRR4       R#   + '       g   i     EL; i  + '       g   i     EL}; i  + '       g   i     EL&; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)r   r'   )Invalid comparison between dtype=period\[z\] and Periodmatch2011YNz@Invalid comparison between dtype=period\[Y-DEC\] and PeriodArray4Mz=Invalid comparison between dtype=period\[4M\] and PeriodArrayr   )r   201220132014)
r   r-   r.   rb   raises	TypeErrorr   to_arrayre   r0   )r2   r(   r3   r   msgr4   rev_msgidx_msgs   &&&     r    test_parr_cmp_pi_mismatched_freq;TestPeriodIndexComparisons.test_parr_cmp_pi_mismatched_freq>  s    GdSt4:4&N]]9C00F6,, 1 ]]9C006$, 1 :EU+RXX/FF'C]]9G44K 5 ;4&N]]9C00F6-- 1 ]]9C006%- 1 :FR+RXX/FF'C]]9G44K 541 100 100 544
 10 10 544sH   G>HH&;H:8I/I >H	H#	&H7	:I
	I	 I1	c                   \        . ROVR7      pV^,          pW#8  p\        P                  ! . RO4      p\        P                  ! WE4       W28  p\        P                  ! WE4       V\
        P                  8H  p\        P                  ! . RO4      p\        P                  ! WE4       \
        P                  V8H  p\        P                  ! WE4       V\
        P                  8g  p\        P                  ! . RO4      p\        P                  ! WE4       \
        P                  V8g  p\        P                  ! WE4       \        . ROVR7      pW&8  p\        P                  ! . RO4      p\        P                  ! WE4       W&8H  p\        P                  ! . RO4      p\        P                  ! WE4       W&8g  p\        P                  ! . RO4      p\        P                  ! WE4       W"8H  p\        P                  ! . R	O4      p\        P                  ! WE4       W"8g  p\        P                  ! . R
O4      p\        P                  ! WE4       R# )r   r'   Nr   r   NaTr   FFFTFFFFTTTTr   r   r   r   r>   r   r   )r   r/   r0   r-   rx   re   r   )r2   r(   idx1rz   r7   r{   idx2s   &&     r   test_pi_cmp_nat*TestPeriodIndexComparisons.test_pi_cmp_nata  s   C$O1ghh23
##F0
##F0hh34
##F04
##F0hh/0
##F04
##F0C$Ohh23
##F0hh34
##F0hh/0
##F0hh01
##F0hh23
##F0r   c                F   \        . ROVR7      p\        . R	ORR7      pRV R2p\        P                  ! \        VR7      ;_uu_ 4        W#8   RRR4       W#8H  p\        P
                  ! . R
O\        R7      p\        P                  ! WV4       R#   + '       g   i     LJ; i)r   r'   r   r   z\] and PeriodArrayr   Ndtyper   r   r   )	r   rb   r   r   r/   r0   boolr-   rx   )r2   r(   r   diffr   r7   r6   s   &&     r   &test_pi_cmp_nat_mismatched_freq_raisesATestPeriodIndexComparisons.test_pi_cmp_nat_mismatched_freq_raises  sw    C$OC$O:4&@RS]]9C00K 1 888E
##F5 10s   	BB 	r   Nc                L   \        \        R 4      \        P                  \        R4      .4      p\        \        P                  \        P                  \        R4      .4      pVe#   VP	                  V4      pVP	                  V4      pW#8H  p\
        P                  ! . RO4      p\        P                  ! WE4       W#8g  p\
        P                  ! . RO4      p\        P                  ! WE4       \
        P                  ! . RO4      p\        P                  ! V\        P                  8H  V4       \        P                  ! \        P                  V8H  V4       \
        P                  ! . RO4      p\        P                  ! V\        P                  8g  V4       \        P                  ! \        P                  V8g  V4       \
        P                  ! . RO4      p\        P                  ! V\        P                  8  V4       \        P                  ! \        P                  V8  V4       R# )
2011-01-01
2011-01-03N)FFTr+   )FFF)TTT)	r   r   re   r   rS   r/   r0   r-   rx   )r2   r   leftrightr7   r6   s   &&    r   test_comp_nat(TestPeriodIndexComparisons.test_comp_nat  sf   F<0"&&&:NOPRVVRVVVL-ABC;;u%DLL'E8801
##F588/0
##F58812
##DBFFNH=
##BFFeOX>88./
##DBFFNH=
##BFFdNH=8812
##D266M8<
##BFFTM8<r   r]   )ru   2M3M)r^   r_   r`   ra   r|   r   rb   rc   rd   r   r   r   r   r   rT   r   rm   rn   ro   s   @r   rr   rr      s     1"*& [[V%67#* 8#*J [[V%67 * 8 *D [[V%67  8 D [[V%67)1 8)1V [[V%67
6 8
6 [[Wvtn5= 6=r   rr   c                   &   a  ] tR tRt o R tRtV tR# )TestPeriodSeriesComparisonsi  c           
        \        \        R RR7      \        RRR7      \        RRR7      \        RRR7      .4      p\        \        RRR7      \        RRR7      \        RRR7      \        R	RR7      .4      p\        . RO4      p\        P                  ! W8H  V4       \        . RO4      p\        P                  ! W8g  V4       \        . RO4      p\        P                  ! W8  V4       \        . RO4      p\        P                  ! W8  V4       \        . RO4      p\        P                  ! W8  V4       \        . RO4      p\        P                  ! W8*  V4       R
# )r   r   r'   r   ru   r   r   r   r   r   Nr   r   r   r   r   r   )r   r   r-   assert_series_equal)r2   r   r   r{   s   &   r   (test_cmp_series_period_series_mixed_freqDTestPeriodSeriesComparisons.test_cmp_series_period_series_mixed_freq  s"   vC(ys+vC(ys+	
 vC(ys+vC(ys+	
 01
t{C0./
t{C001
tz3//0
tz3//0
t{C0./
t{C0r   r]   N)r^   r_   r`   ra   r   rm   rn   ro   s   @r   r   r     s     $1 $1r   r   c                   6   a  ] tR tRt o RtR tR tR tRtV t	R# )*TestPeriodIndexSeriesComparisonConsistencyi  2Test PeriodIndex and Period Series Ops consistencyc                :   \        V4      pV! V4      p\        V\        P                  \        P
                  34      '       g   Q h\        P                  ! WS4       \        V4      pV! V4      p\        W1P                  R 7      p\        P                  ! WW4       R# nameN)r   
isinstancere   rl   r/   ndarrayr-   r1   r   r   r   )r2   rw   funcr6   r4   r7   r   r{   s   &&&&    r   _check1TestPeriodIndexSeriesComparisonConsistency._check  ss     &!c (RXXrzz$:;;;;
)6NaXKK0
v+r   c                  a \        . RORRR7      pV^,          oV3R lp\        P                  ! . RO\        P                  R7      pV P	                  WV4       V3R lpV P	                  WV4       V3R lp\        P                  ! . RO\        P                  R7      pV P	                  WV4       V3R lpV P	                  WV4       V3R	 lp\        P                  ! . RO\        P                  R7      pV P	                  WV4       V3R
 lp\        P                  ! . RO\        P                  R7      pV P	                  WV4       V3R lp\        P                  ! . RO\        P                  R7      pV P	                  WV4       R# )r   ru   r4   r(   r   c                    < V S8H  # rR   r]   rV   rz   s   &r   rW   PTestPeriodIndexSeriesComparisonConsistency.test_pi_comp_period.<locals>.<lambda>  	    a3hr   r   c                    < SV 8H  # rR   r]   r   s   &r   rW   r     	    cQhr   c                    < V S8g  # rR   r]   r   s   &r   rW   r     r   r   c                    < SV 8g  # rR   r]   r   s   &r   rW   r     r   r   c                    < SV 8  # rR   r]   r   s   &r   rW   r     r   r   c                    < V S8  # rR   r]   r   s   &r   rW   r     	    a#gr   c                    < SV 8  # rR   r]   r   s   &r   rW   r     r   r   Nr   r   r   )TTTFr   r   r/   r0   bool_r   r2   r4   fr{   rz   s   &   @r   test_pi_comp_period>TestPeriodIndexSeriesComparisonConsistency.test_pi_comp_period  s   8s
 !fhh2"((CCC CC hh0ACC CC hh0ACC hh2"((CCC hh0ACC r   c                  a \        . RORRR7      pV^,          oV3R lp\        P                  ! . RO\        P                  R7      pV P	                  WV4       V3R lpV P	                  WV4       R p\        P                  ! . RO\        P                  R7      pV P	                  WV4       R pV P	                  WV4       V3R	 lp\        P                  ! . RO\        P                  R7      pV P	                  WV4       V3R
 lpV P	                  WV4       R p\        P                  ! . RO\        P                  R7      pV P	                  WV4       R pV P	                  WV4       V3R lp\        P                  ! . RO\        P                  R7      pV P	                  WV4       V3R lp\        P                  ! . RO\        P                  R7      pV P	                  WV4       R p\        P                  ! . RO\        P                  R7      pV P	                  WV4       R p\        P                  ! . RO\        P                  R7      pV P	                  WV4       R# )r   ru   r4   r   c                    < V S8H  # rR   r]   r   s   &r   rW   TTestPeriodIndexSeriesComparisonConsistency.test_pi_comp_period_nat.<locals>.<lambda>  r   r   r   c                    < SV 8H  # rR   r]   r   s   &r   rW   r     r   r   c                 (    V \         P                  8H  # rR   re   r   rU   s   &r   rW   r          a266kr   c                 (    \         P                  V 8H  # rR   r   rU   s   &r   rW   r   #      bffkr   c                    < V S8g  # rR   r]   r   s   &r   rW   r   &  r   r   c                    < SV 8g  # rR   r]   r   s   &r   rW   r   )  r   r   c                 (    V \         P                  8g  # rR   r   rU   s   &r   rW   r   ,  r   r   c                 (    \         P                  V 8g  # rR   r   rU   s   &r   rW   r   /  r   r   c                    < SV 8  # rR   r]   r   s   &r   rW   r   2  r   r   c                    < V S8  # rR   r]   r   s   &r   rW   r   6  r   r   c                 (    V \         P                  8  # rR   r   rU   s   &r   rW   r   :  s    a"&&jr   c                 (    \         P                  V 8  # rR   r   rU   s   &r   rW   r   >  r   r   Nr   r   r   r   r   r   r   r   )TFTFr>   r   r   s   &   @r   test_pi_comp_period_natBTestPeriodIndexSeriesComparisonConsistency.test_pi_comp_period_nat  s   43U
 !fhh2"((CCC CC !hh3288DCC !CC hh0ACC CC !hh/rxx@CC !CC hh1BCC hh2"((CCC  hh3288DCC !hh3288DCC r   r]   N)
r^   r_   r`   ra   __doc__r   r   r   rm   rn   ro   s   @r   r   r     s     <, !<,! ,!r   r   c                   &   a  ] tR tRt o R tRtV tR# )TestPeriodFrameArithmeticiG  c                   \         P                  ! R \        RRR7      \        RRR7      .R\        RRR7      \        RRR7      ./4      pVR ,          P                  R8X  g   Q hVR,          P                  R8X  g   Q h\        R	RR7      pVP                  p\         P                  ! R \
        P                  ! ^V,          ^V,          .\        R
7      R\
        P                  ! ^V,          ^V,          .\        R
7      /4      p\        P                  ! W!,
          V4       \        P                  ! W,
          RV,          4       \         P                  ! R \        RRR7      \        RRR7      .R\        RRR7      \        RRR7      ./4      pVR ,          P                  R8X  g   Q hVR,          P                  R8X  g   Q h\         P                  ! R \
        P                  ! ^V,          ^V,          .\        R
7      R\
        P                  ! ^V,          ^V,          .\        R
7      /4      p\        P                  ! WQ,
          V4       \        P                  ! W,
          RV,          4       R# )Az2015-01ru   r'   z2015-02B2014-01z2014-02	Period[M]z2015-03r   z2015-05z2015-06NrZ   )
re   	DataFramer   r   r(   r/   r0   rT   r-   assert_frame_equal)r2   dfpoffr{   df2s   &     r   test_ops_frame_period/TestPeriodFrameArithmetic.test_ops_frame_periodH  s   \\fYS16)#3NOfYS16)#3NO
 #w}}+++#w}}+++93'ffllRXXq3wC0?RXXrCxc2&A
 	afc*
bfb3h/llfYS16)#3NOfYS16)#3NO
 3x~~,,,3x~~,,,llRXXq3wC0?RXXrCxc2&A
 	ch,
bhS1r   r]   N)r^   r_   r`   ra   r  rm   rn   ro   s   @r   r   r   G  s     '2 '2r   r   c                     a  ] tR tRt o R tR tR tR t]P                  P                  R. REO4      R 4       t]P                  P                  R. REO4      ]P                  P                  R]P                  P                  R	3]P                  P                  R
3]P                  P                   R3]P                  P"                  R3.4      R 4       4       t]P                  P                  R]! R4      ]! R4      P)                  4       ]! R4      P+                  4       ]P,                  ! R^RR7      ]P,                  ! R^RR7      ]P,                  ! R^RR7      P.                  ]P,                  ! R^RR7      P.                  R]P2                  ! . RFO4      .	4      R 4       tR tR t]P                  P                  R. RGO4      ]P                  P                  RRR.4      R 4       4       t]P                  P                  R]P2                  ]P<                  .4      R 4       t]P                  P                  R]P2                  ]P<                  .4      R 4       t R  t!R! t"]P                  P                  R"^]P2                  ! ^]PF                  R#7      .4      R$ 4       t$R% t%R& t&]P                  P                  R'R(R).4      R* 4       t'R+ t(]P                  P                  R,]P2                  ]P<                  .4      ]P                  P                  R-])PT                  ]+PX                  .4      R. 4       4       t-]P                  P                  R,]P2                  ]P<                  .4      R/ 4       t.R0 t/]P                  P                  R1. RHO4      R2 4       t0R3 t1R4 t2R5 t3R6 t4R7 t5R8 t6R9 t7R: t8R; t9R< t:]P                  P                  R'R(R).4      R= 4       t;]P                  P                  R]P2                  ! R>.^	,          R?R#7      ]<Pz                  ! R>.^	,          R?R#7      .4      R@ 4       t>RA t?RB t@RC tARDtBV tCR# )ITestPeriodIndexArithmeticir  c                   \        R R^R7      p\        RR^R7      p\        P                  ! W!4      pRp\        P                  ! \
        VR7      ;_uu_ 4        W#,            RRR4       \        P                  ! \
        VR7      ;_uu_ 4        W#,          pRRR4       R#   + '       g   i     LG; i  + '       g   i     R# ; i)1/1/2000r   r(   r=   1/6/2000z/unsupported operand type\(s\) for \+: .* and .*r   N)r   r-   r.   rb   r   r   )r2   r3   rngr%   r   s   &&   r   test_parr_add_iadd_parr_raises8TestPeriodIndexArithmetic.test_parr_add_iadd_parr_raisesy  s    :C;Zc1= ooc2
 A]]9C00K 1 ]]9C00LC 10 10 100s   	B!	B4!B1	4C	c                   \        R R^R7      p\        RR^R7      pVP                  p\        P                  ! RV,          .^,          4      pW,
          p\        P
                  ! WT4       W,          p\        P
                  ! W4       R# )r  r   r  r  N)r   r(   re   rl   r-   assert_index_equal)r2   r  r%   r	  r6   r7   s   &     r   test_pi_sub_isub_pi-TestPeriodIndexArithmetic.test_pi_sub_isub_pi  sk    
 :C;Zc1=hh88R#XJN+
f/
c,r   c                   \        R R^R7      pVR,          P                  ^ \        P                  4      pVR,          P	                  VR,          4      '       g   Q hW,
          pVP
                  p\        P                  ! \        P                  ^ V,          ^ V,          ^ V,          ^ V,          .4      p\        P                  ! W54       R# )r  r   r  :   NNN)	r   insertre   r   equalsr(   rl   r-   r  )r2   r  r%   r7   r	  r6   s   &     r   test_pi_sub_pi_with_nat1TestPeriodIndexArithmetic.test_pi_sub_pi_with_nat  s    :C;Bq"&&)RyB((((hh88RVVQWa#gq3wCHI
f/r   c                ,   \        R R^R7      p\        RR^R7      p\        P                  ! W14      p\        P                  ! WB4      pRp\        P                  ! \
        VR7      ;_uu_ 4        W4,
           RRR4       R#   + '       g   i     R# ; i)r  r   r  r  hz;Input has different freq=[hD] from PeriodArray\(freq=[Dh]\)r   N)r   r-   r.   rb   r   r   )r2   r3   box_with_array2r  r%   r   s   &&&   r    test_parr_sub_pi_mismatched_freq:TestPeriodIndexArithmetic.test_parr_sub_pi_mismatched_freq  se    :C;Zc1=ooc27L]]0<<K =<<<s   /	BB	nc                *   R pRp\        V.V! V4      R7      p\        V.V! V4      R7      p\        V.VP                  P                  R7      \        V.VP                  P                  R7      ,
          p\        P                  ! We,
          V4       R# )1991090519920406r'   N)r   r(   r   r-   r  )r2   tick_classesr&  p1_dp2_dp1p2r6   s   &&&     r   test_sub_n_gt_1_ticks/TestPeriodIndexArithmetic.test_sub_n_gt_1_ticks  sw     $l1o6$l1o6vBGGLL9KF=
 
 	rw2r   zoffset, kwd_namemonthstartingMonthNweekdayc                   Ve   V^/M/ pRpRpV! V3RR/VB p\        V.VR7      p\        V.VR7      p	W,
          p
\        V.VP                  R7      \        V.VP                  R7      ,
          p\        P                  ! W4       R # )Nr(  r)  	normalizeFr'   )r   r   r-   r  )r2   offsetkwd_namer&  kwdsr+  r,  r(   r-  r.  r7   r6   s   &&&&        r   test_sub_n_gt_1_offsets1TestPeriodIndexArithmetic.test_sub_n_gt_1_offsets  s     !) 4!}"a151D1$d+$d+vDII6F:
 
 	f/r   r%   
2016-01-01r"  rv   zEurope/Brussels)r=   tzr   z
Asia/TokyogQ	@c                   \        R R^R7      p\        P                  ! W24      pRP                  . RO4      p\	        W1V4       \
        P                  ! \        VR7      ;_uu_ 4        W1,            RRR4       \
        P                  ! \        VR7      ;_uu_ 4        W,            RRR4       \
        P                  ! \        VR7      ;_uu_ 4        W1,
           RRR4       \
        P                  ! \        VR7      ;_uu_ 4        W,
           RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lm; i  + '       g   i     R# ; i)r  r   r  |r   N)z!(:?cannot add PeriodArray and .*)z&(:?cannot subtract .* from (:?a\s)?.*)z3(:?unsupported operand type\(s\) for \+: .* and .*)z1unsupported operand type\(s\) for [+-]: .* and .*)r   r-   r.   joinr   rb   r   r   )r2   r%   r3   r  r   s   &&&  r   test_parr_add_sub_invalid3TestPeriodIndexArithmetic.test_parr_add_sub_invalid  s    & :C;ooc2hh
 	#3s3]]9C00K 1]]9C00K 1]]9C00K 1]]9C00K 10 100000000s0   (	D	D-	E 	ED*	-D=	 E	E$	c                   \        R R^R7      p\        . RO4      pVP                  pRp\        P                  ! \
        VR7      ;_uu_ 4        W,            RRR4       \        P                  ! \
        VR7      ;_uu_ 4        W1,            RRR4       \        P                  ! \
        VR7      ;_uu_ 4        W,
           RRR4       Rp\        P                  ! \
        VR7      ;_uu_ 4        W1,
           RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lo; i  + '       g   i     R# ; i)r  Qr  zCCannot add or subtract timedelta64\[ns\] dtype from period\[Q-DEC\]r   Nz/cannot subtract PeriodArray from TimedeltaArray-1 DayrE  rE  )r   r
   rw   rb   r   r   )r2   r  tditdarrr   s   &    r   *test_pi_add_sub_td64_array_non_tick_raisesDTestPeriodIndexArithmetic.test_pi_add_sub_td64_array_non_tick_raises  s    :C;;<

T]]9C00K 1]]9C00K 1 ]]9C00K 1@]]9C00K 10 1000 10 100s0   	D	D8	D(/	D;D	D%	(D8	;E	c                   \        R R^R7      p\        . RO4      pVP                  p\        RR^R7      pW,           p\        P                  ! WT4       W,           p\        P                  ! WT4       W!,           p\        P                  ! WT4       W1,           p\        P                  ! WT4       \        RR^R7      pW,
          p\        P                  ! WT4       W,
          p\        P                  ! WT4       Rp\
        P                  ! \        VR7      ;_uu_ 4        W1,
           RRR4       \
        P                  ! \        VR7      ;_uu_ 4        W!,
           RRR4       R#   + '       g   i     LG; i  + '       g   i     R# ; i)	r  90Dr  z
12/31/1999z1/2/2000cannot subtract .* from .*r   NrD  )r   r
   rw   r-   r  rb   r   r   )r2   r  rF  rG  r6   r7   r   s   &      r   test_pi_add_sub_td64_array_tick9TestPeriodIndexArithmetic.test_pi_add_sub_td64_array_tick  s    :E1=;<

5!D
f/
f/
f/
f/
B
f/
f/+]]9C00K 1 ]]9C00I 10 10 100s   	E&	E9&E6	9F
	pi_freqtdi_freqc                "   TpV\         P                  \        P                  39  d   TM\         P                  p\        R R.VR7      p\        R4      V,           pVP                  V4      p\        P                  ! Wd4      p	VR8X  d   W,
          p
VP                  R4      V,
          P                  V4      p\        P                  ! W4      p\        P                  ! W4       V^ ,          V	,
          p
V^ ,          P                  R4      V,
          P                  V4      p\        P                  ! W4      p\        P                  ! W4       R	# VR8X  dw   Rp\        P                  ! \        VR7      ;_uu_ 4        W,
           R	R	R	4       \        P                  ! \        VR7      ;_uu_ 4        V^ ,          V	,
           R	R	R	4       R	# R
p\        P                  ! \        VR7      ;_uu_ 4        W,
           R	R	R	4       \        P                  ! \        VR7      ;_uu_ 4        V^ ,          V	,
           R	R	R	4       R	#   + '       g   i     L; i  + '       g   i     R	# ; i  + '       g   i     Lv; i  + '       g   i     R	# ; i)z1 hoursz2 hoursr'   z2018-03-07 17:16:40r"  r   r   nCannot add/subtract timedelta-like from PeriodArray that is not an integer multiple of the PeriodArray's freq.r   Nz"Cannot add or subtract timedelta64)re   r0   r-   r   rl   r
   r   	to_periodr.   to_timestampr1   rb   r   r   r   )r2   r3   rP  rO  boxr5   rF  dtir@   td64objr7   r6   r   s   &&&&         r   test_parr_sub_td64array1TestPeriodIndexArithmetic.test_parr_sub_td64array4  s    "((BKK!88sbhhi3(C-.4]]7# //#+c>\F,s2==gFHx6HOOF- UW_F1**3/#5@@IHx5HOOF-^E  4C@@ A 4C@@1 A@ 7Cy44 5y441 54 A@ A@@ 54444s0   =	I2I3	I*(I=I	I'	*I:	=J	rU  c           	     V   \        \        R 4      \        R4      .4      pV! \        P                  P	                  ^^R7      \        P                  P	                  R	^R7      .4      p\        \        R4      \        R4      .4      P                  \        4      p\        P                  ! V4      ;_uu_ 4        W4,           pRRR4       \        P                  ! XV4       \        P                  ! V4      ;_uu_ 4        WC,           pRRR4       \        P                  ! XV4       \        P                  ! \        P                  P                  ^R7      \        P                  P                  R	R7      .4      pRp	\        P                  ! \         V	R7      ;_uu_ 4        \        P                  ! V4      ;_uu_ 4        W8,            RRR4       RRR4       \        P                  ! \         V	R7      ;_uu_ 4        \        P                  ! V4      ;_uu_ 4        W,            RRR4       RRR4       R#   + '       g   i     EL~; i  + '       g   i     ELL; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lh; i  + '       g   i     R# ; i)
2015Q12016Q2r&  r2  2015Q22015Q4Nr&  z1Input cannot be converted to Period\(freq=Q-DEC\)r   )r   r   re   offsets
QuarterEndrS   rT   r-   assert_produces_warningr  r/   r0   HourMinuterb   r   r   )
r2   performance_warningrU  r@   offsr6   resres2
unanchoredr   s
   &&&       r   test_pi_add_offset_array2TestPeriodIndexArithmetic.test_pi_add_offset_arraye  s    &*F8,<=>

%%%<

%%"%=
 x 0&2BCDKKFS''(;<<)C =
c8,''(;<<9D =
dH-XXrzz3RZZ5F5F5F5LMN
 C]]0<<++,?@@ A = ]]0<<++,?@@ A =< =<< =<< A@ =< A@ =<<s`   8	H6>	I
 I1?	I	I1<J	J	$J6I	
I	I.)I11J	JJJ(	c           	        \        \        R 4      \        R4      .4      pV! \        P                  P	                  ^^R7      \        P                  P	                  R^R7      .4      p\        \        \        V4      4       Uu. uF  qSV,          WE,          ,
          NK  	  up4      pVP                  \        4      p\        P                  ! V4      ;_uu_ 4        W4,
          pRRR4       \        P                  ! XV4       V! \        P                  P                  4       \        P                  P                  ^R7      .4      pRp	\        P                  ! \         V	R7      ;_uu_ 4        \        P                  ! V4      ;_uu_ 4        W8,
           RRR4       RRR4       \        P                  ! \         V	R7      ;_uu_ 4        \        P                  ! V4      ;_uu_ 4        W,
           RRR4       RRR4       R# u upi   + '       g   i     EL-; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     LY; i  + '       g   i     R# ; i)r[  r\  r]  Nr`  z6Input has different freq=-1M from Period\(freq=Q-DEC\)r   ra  )r   r   re   rb  rc  rk   lenrS   rT   r-   rd  r  MonthEndDayrb   r   r   )
r2   rg  rU  r@   r%   r&  r6   ri  anchoredr   s
   &&&       r   test_pi_sub_offset_array2TestPeriodIndexArithmetic.test_pi_sub_offset_array  s    &*F8,<=>

%%%<

%%"%=
 %B.I.Q1 0 0.IJ??6*''(;<<*C =
c8,

++-rzz~~~/BCD H]]0<<++,?@@ A = ]]0<<++,?@@ A =<  J =<< A@ =< A@ =<<sZ   H	H-H/	H	H/	I(	I	1IH	H,'H//H?	III&	c                    \        R R^
R7      pW!,           p\        RR^
R7      p\        P                  ! W44       W!,          p\        P                  ! W$4       R# )2000-01-01 09:00r"  r  z2000-01-01 10:00Nr   r-   r  r2   oner  r7   r6   s   &&   r   test_pi_add_iadd_int.TestPeriodIndexArithmetic.test_pi_add_iadd_int  sJ    -CD 2bI
f/

c,r   c                    \        RR^
R7      pW!,
          p\        RR^
R7      p\        P                  ! W44       W!,          p\        P                  ! W$4       R# )zs
PeriodIndex.__sub__ and __isub__ with several representations of
the integer 1, e.g. int, np.int64, np.uint8, ...
rv  r"  r  z2000-01-01 08:00Nrw  rx  s   &&   r   test_pi_sub_isub_int.TestPeriodIndexArithmetic.test_pi_sub_isub_int  sL    
 -CD 2bI
f/

c,r   fiver   c                n    \        R ^2R7      pW!,
          pW!) ,           p\        P                  ! W44       R# )rt   r<   Nrw  )r2   r  r  r7   r{   s   &&   r   test_pi_sub_intlike-TestPeriodIndexArithmetic.test_pi_sub_intlike  s,    9b1Um
f*r   c                   \        R ^
RR7      p\        P                  ! ^
4      pW,           p\        P                  ! \        WRR7       UUu. uF  w  rEWE,           NK  	  upp4      p\        P                  ! W64       W,
          p\        P                  ! \        WRR7       UUu. uF  w  rEWE,
          NK  	  upp4      p\        P                  ! W64       R# u uppi u uppi )r;  2Drv   T)strictN)r   r/   rh   re   rl   zipr-   r  )r2   r@   arrr7   rV   yr6   s   &      r   #test_pi_add_sub_int_array_freqn_gt1=TestPeriodIndexArithmetic.test_pi_add_sub_int_array_freqn_gt1  s     ,>iim88s24/HI/HtqQUU/HIJ
f/88s24/HI/HtqQUU/HIJ
f/ J Js   C
&C
c                V   \        R RRR7      pV\        P                  P                  ^4      ,
          p\        RRRR7      p\        P
                  ! W#4       V\        P                  P                  ^4      ,          p\        P
                  ! W4       \        RRRR7      pV\        P                  P                  ^4      ,
          p\        R	R
RR7      p\        P
                  ! W#4       V\        P                  P                  ^4      ,          p\        P
                  ! W4       R# )r   2024r   r'   20092019r  2016-12ru   z2013-08z2016-07N)r   re   rb  YearEndr-   r  rp  r2   r  r7   r6   s   &   r   test_pi_sub_isub_offset1TestPeriodIndexArithmetic.test_pi_sub_isub_offset  s     664rzz))!,,S9
f/rzz!!!$$
c,9ic:rzz**1--	93?
f/rzz""1%%
c,r   	transposeTFc                V   \        R RR7      p\        V.4      p\        R.RR7      p\        P                  ! WAVR7      p\        P                  ! WQVR7      pWCP                  ,           p\        P
                  ! We4       VP                  V,           p\        P
                  ! We4       R# )2016-01r   r'   z2016-03r  N)r   r   r-   r.   r(   r1   )r2   r3   r  rz   r@   r6   r7   s   &&&    r   test_pi_add_offset_n_gt12TestPeriodIndexArithmetic.test_pi_add_offset_n_gt1  sz    
 YT*#	{6__R9E??8yQhh
)B
)r   c                6   \        R .RR7      p\        R.RR7      p\        P                  ! W!4      p\        P                  ! W14      pV\        R4      ,           p\        P                  ! WC4       \        R4      V,           p\        P                  ! WC4       R# )r  r   r'   z2016-043MEN)r   r-   r.   r   r1   )r2   r3   r@   r6   r7   s   &&   r   &test_pi_add_offset_n_gt1_not_divisible@TestPeriodIndexArithmetic.test_pi_add_offset_n_gt1_not_divisible  sr     )40	{6__R0??8<i&&
)5!B&
)r   
int_holderopc                    \        \        R 4      \        R4      .4      pV! ^R.4      pV! W44      p\        \        R4      \        R4      .4      p\        P                  ! WV4       R# )r[  r   2016Q1NrZ   )r   r   r-   r  )r2   r  r  r@   r%   r7   r6   s   &&&    r   test_pi_add_intarray.TestPeriodIndexArithmetic.test_pi_add_intarray  sY     &*F5M:;Ar7#Bx 0&-@A
f/r   c                h   \        \        R 4      \        R4      .4      pV! ^R.4      pW#,
          p\        \        R4      \        R4      .4      p\        P                  ! WE4       Rp\        P
                  ! \        VR7      ;_uu_ 4        W2,
           RRR4       R#   + '       g   i     R# ; i)r[  r   2014Q1+bad operand type for unary -: 'PeriodArray'r   NrZ   )r   r   r-   r  rb   r   r   )r2   r  r@   r%   r7   r6   r   s   &&     r   test_pi_sub_intarray.TestPeriodIndexArithmetic.test_pi_sub_intarray  s     &*F5M:;Ar7#x 0&-@A
f/<]]9C00J 1000s   	B  B1	c                R   Tp\        R ^RR7      p\        P                  ! WB4      p\        . R	ORR7      p\        P                  ! WR4      pWC,           p\        P                  ! We4       W4,           p\        P                  ! We4       \        . R
ORR7      p\        P                  ! WR4      pWC,
          p\        P                  ! We4       RP                  RR.4      p\        P                  ! \        VR7      ;_uu_ 4        W4,
           RRR4       R#   + '       g   i     R# ; i)
2014-05-01r  rv   r'   r>  r  4cannot subtract PeriodArray from timedelta64\[[hD]\]r   N)
2014-05-04z
2014-05-06z
2014-05-08)
2014-04-28z
2014-04-30z
2014-05-02)	r   r-   r.   r   r1   r?  rb   r   r   )r2   
three_daysr3   r%   r  r6   r7   r   s   &&&     r   &test_parr_add_timedeltalike_minute_gt1@TestPeriodIndexArithmetic.test_parr_add_timedeltalike_minute_gt1   s    
 <>ooc2IPTU??8<
)
) IPTU??8<
)hh>G
 ]]9C00K 1000s   	DD&	freqstrc                x   Tp\        R ^VR7      pV^ ,          p\        P                  ! WS4      p\        Wd,           ^VR7      p\        P                  ! Ws4      pWT,           p\        P                  ! W4       WE,           p\        P                  ! W4       \        Wd,
          ^VR7      p\        P                  ! Ws4      pWT,
          p\        P                  ! W4       RP	                  RR.4      p	\
        P                  ! \        V	R7      ;_uu_ 4        WE,
           RRR4       R#   + '       g   i     R# ; i)r  rv   r>  r  r  r   N)r   r-   r.   r1   r?  rb   r   r   )
r2   r  r  r3   r%   r  firstr6   r7   r   s
   &&&&      r   $test_parr_add_timedeltalike_tick_gt1>TestPeriodIndexArithmetic.test_parr_add_timedeltalike_tick_gt1A  s     <AAooc2qwG??8<
)
)  qwG??8<
)hh>G
 ]]9C00K 1000s   	D((D9	c                    Tp\        R RRR7      p\        RRRR7      pW2,           p\        P                  ! WT4       W2,          p\        P                  ! W44       R# )r  
2014-05-15r   r'   r  z
2014-05-18Nrw  r2   r  r%   r  r6   r7   s   &&    r   $test_pi_add_iadd_timedeltalike_daily>TestPeriodIndexArithmetic.test_pi_add_iadd_timedeltalike_dailya  M    <C@lE
f/
c,r   c                    Tp\        R RRR7      p\        RRRR7      pW2,
          p\        P                  ! WT4       W2,          p\        P                  ! W44       R# )r  r  r   r'   r  z
2014-05-12Nrw  r  s   &&    r   $test_pi_sub_isub_timedeltalike_daily>TestPeriodIndexArithmetic.test_pi_sub_isub_timedeltalike_dailym  r  r   c                   Tp\        R RRR7      p\        P                  ! WB4      pRP                  RR.4      p\        P
                  ! \        VR7      ;_uu_ 4        WC,            RRR4       \        P
                  ! \        VR7      ;_uu_ 4        WC,          pRRR4       \        P
                  ! \        VR7      ;_uu_ 4        WC,
           RRR4       \        P
                  ! \        VR7      ;_uu_ 4        WC,          pRRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lm; i  + '       g   i     R# ; i)	r  r  r   r'   r>  z7Input has different freq(=.+)? from Period.*?\(freq=D\)rR  r   Nr   r-   r.   r?  rb   r   r   )r2   	not_dailyr3   r%   r  r   s   &&&   r   3test_parr_add_sub_timedeltalike_freq_mismatch_dailyMTestPeriodIndexArithmetic.test_parr_add_sub_timedeltalike_freq_mismatch_dailyy  s     <C@ooc2hh LE	
 ]]0<<K =]]0<<LC =]]0<<K =]]0<<LC =< =<<<<<<<<s0   	D	D#	D6=	E	D 	#D3	6E		E	c                    Tp\        R RRR7      p\        RRRR7      pW2,           p\        P                  ! WT4       W2,          p\        P                  ! W44       R# )2014-01-01 10:002014-01-05 10:00r"  r'   z2014-01-01 12:00z2014-01-05 12:00Nrw  r2   	two_hoursr%   r  r6   r7   s   &&    r   %test_pi_add_iadd_timedeltalike_hourly?TestPeriodIndexArithmetic.test_pi_add_iadd_timedeltalike_hourly  Q    -/AL 24FSQ
f/
c,r   c                   Tp\        R RRR7      p\        P                  ! WB4      pRP                  RR.4      p\        P
                  ! \        VR7      ;_uu_ 4        WC,            RRR4       \        P
                  ! \        VR7      ;_uu_ 4        WC,          pRRR4       R#   + '       g   i     LG; i  + '       g   i     R# ; i)	r  r  r"  r'   r>  z7Input has different freq(=.+)? from Period.*?\(freq=h\)rR  r   Nr  )r2   r   r3   r%   r  r   s   &&&   r   2test_parr_add_timedeltalike_mismatched_freq_hourlyLTestPeriodIndexArithmetic.test_parr_add_timedeltalike_mismatched_freq_hourly  s     -/ALooc2hh LE	
 ]]0<<K = ]]0<<LC =< =< =<<s   	B&	B9&B6	9C
	c                    Tp\        R RRR7      p\        RRRR7      pW2,
          p\        P                  ! WT4       W2,          p\        P                  ! W44       R# )r  r  r"  r'   z2014-01-01 08:00z2014-01-05 08:00Nrw  r  s   &&    r   %test_pi_sub_isub_timedeltalike_hourly?TestPeriodIndexArithmetic.test_pi_sub_isub_timedeltalike_hourly  r  r   c                .   \        R RRR7      pV\        P                  P                  ^4      ,           p\        RRRR7      p\        P
                  ! W#4       V\        P                  P                  ^4      ,          p\        P
                  ! W4       R# )r   r  r   r'   r  2029N)r   re   rb  r  r-   r  r  s   &   r   "test_add_iadd_timedeltalike_annual<TestPeriodIndexArithmetic.test_add_iadd_timedeltalike_annual  sn     664rzz))!,,S9
f/rzz!!!$$
c,r   c                l   Tp\        R RRR7      pRp\        P                  ! \        VR7      ;_uu_ 4        W2,            RRR4       \        P                  ! \        VR7      ;_uu_ 4        W2,          pRRR4       \        P                  ! \        VR7      ;_uu_ 4        W2,
           RRR4       \        P                  ! \        VR7      ;_uu_ 4        W2,          pRRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lm; i  + '       g   i     R# ; i)r   r  r   r'   z;Input has different freq(=.+)? from Period.*?\(freq=Y-DEC\)r   Nr   rb   r   r   r2   r"   r%   r  r   s   &&   r   2test_pi_add_sub_timedeltalike_freq_mismatch_annualLTestPeriodIndexArithmetic.test_pi_add_sub_timedeltalike_freq_mismatch_annual  s    664M]]0<<K =]]0<<LC =]]0<<K =]]0<<LC =< =<<<<<<<</   	C),	C<!	D	D")C9	<D	D	"D3	c                .   \        R RRR7      p\        RRRR7      pV\        P                  P                  ^4      ,           p\        P
                  ! W24       V\        P                  P                  ^4      ,          p\        P
                  ! W4       R# )r  r  ru   r'   z2014-06z2017-05N)r   re   rb  rp  r-   r  )r2   r  r6   r7   s   &   r    test_pi_add_iadd_timedeltalike_M:TestPeriodIndexArithmetic.test_pi_add_iadd_timedeltalike_M  sl    9ic:	93?rzz**1--
f/rzz""1%%
c,r   c                l   Tp\        R RRR7      pRp\        P                  ! \        VR7      ;_uu_ 4        W2,            RRR4       \        P                  ! \        VR7      ;_uu_ 4        W2,          pRRR4       \        P                  ! \        VR7      ;_uu_ 4        W2,
           RRR4       \        P                  ! \        VR7      ;_uu_ 4        W2,          pRRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lm; i  + '       g   i     R# ; i)r  r  ru   r'   z7Input has different freq(=.+)? from Period.*?\(freq=M\)r   Nr  r  s   &&   r   3test_pi_add_sub_timedeltalike_freq_mismatch_monthlyMTestPeriodIndexArithmetic.test_pi_add_sub_timedeltalike_freq_mismatch_monthly  s    9ic:I]]0<<K =]]0<<LC =]]0<<K =]]0<<LC =< =<<<<<<<<r  c                "   \        R ^	RR7      p\        P                  ! R4      p\        R.^	,          RR7      p\        P
                  ! W1VR7      p\        P
                  ! WQVR7      pWd,           p\        P                  ! Wu4       WF,           p\        P                  ! Wu4       Wd,
          p\        P                  ! Wu4       Rp\        P                  ! \        VR7      ;_uu_ 4        WF,
           RRR4       R#   + '       g   i     R# ; i)	
1994-04-0119Drv   r   r'   r  rL  r   N)
r   r/   timedelta64r   r-   r.   r1   rb   r   r   )	r2   r3   r  r@   r%   r6   objr7   r   s	   &&&      r   test_parr_add_sub_td64_nat4TestPeriodIndexArithmetic.test_parr_add_sub_td64_nat  s     ,>u%w{7oobIF??8yQ
)
)
)+]]9C00K 1000s   *	C==D	r   m8[ns]c                   \        R ^	RR7      p\        R.^	,          RR7      p\        P                  ! W14      p\        P                  ! WA4      pWR,           p\        P                  ! Wd4       W%,           p\        P                  ! Wd4       WR,
          p\        P                  ! Wd4       Rp\
        P                  ! \        VR7      ;_uu_ 4        W%,
           RRR4       VP                  4       p\        P                  ! ^ R4      V^ &   \        V^ ,          .R.^,          ,           RR7      p\        P                  ! WA4      pWR,           p\        P                  ! Wd4       W%,           p\        P                  ! Wd4       WR,
          p\        P                  ! Wd4       \
        P                  ! \        VR7      ;_uu_ 4        W%,
           RRR4       R#   + '       g   i     EL; i  + '       g   i     R# ; i)	r  r  rv   r   r'   rL  r   Nns)r   r   r-   r.   r1   rb   r   r   copyr/   r  )r2   r3   r%   r@   r6   r  r7   r   s   &&&     r   !test_parr_add_sub_tdt64_nat_array;TestPeriodIndexArithmetic.test_parr_add_sub_tdt64_nat_array   sT    ,>w{7oob1??8<
)
)
)+]]9C00K 1 

>>!T*a1w%145A??8<
)
)
)]]9C00K 10 100 100s   	G	G*G'	*G;	c                    \        R ^R7      pVP                  pW!,
          pW,
          p\        P                  ! W44       R# )
2000-12-31r<   N)r   r0   r-   r  )r2   r@   rI   r7   r6   s   &    r   test_parr_add_sub_index1TestPeriodIndexArithmetic.test_parr_add_sub_index*  s3    ,2xx7
f/r   c                   \        R ^RR7      pVP                  p\        P                  ! \        ^R7      \        P
                  P                  ^4      ^.4      p\        P                  ! V4      ;_uu_ 4        W4,           pRRR4       \        . RORR7      P                  P                  \        4      p\        P                  ! XV4       \        P                  ! V4      ;_uu_ 4        W4,
          pRRR4       \        R.^,          RR7      P                  P                  \        4      p\        P                  ! WV4       R#   + '       g   i     L; i  + '       g   i     Lm; i)r  r   rv   r   Nr'   z
2000-12-30)z
2001-01-01z
2001-01-03z
2001-01-05)r   r0   r/   r	   re   rb  rq  r-   rd  r   _datarS   rT   r1   )r2   rg  r@   rI   r%   r7   r6   s   &&     r   test_parr_add_sub_object_array8TestPeriodIndexArithmetic.test_parr_add_sub_object_array3  s    ,<xx)+RZZ^^A->BC''(;<<\F = 6S

%v 	 	)''(;<<\F = ~1<BBII&Q
) =< =<s   9	E+	EE	E)	c                j   \        R 4      p\        R RR7      p\        P                  ! V.RR7      p\        P
                  ! WA4      pRp\        P                  ! \        VR7      ;_uu_ 4        WB,            RRR4       \        P                  ! \        VR7      ;_uu_ 4        W$,            RRR4       Rp\        P                  ! \        VR7      ;_uu_ 4        V\        V.4      ,            RRR4       \        P                  ! \        VR7      ;_uu_ 4        \        V.4      V,            RRR4       \        P                  ! \        VR7      ;_uu_ 4        V\        P                  ! V.4      ,            RRR4       \        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V.4      V,            RRR4       V\        P                  J d   RpMR	p\        P                  ! \        VR7      ;_uu_ 4        V\        P                  ! V.4      ,            RRR4       V\        P                  J d   RpMR
p\        P                  ! \        VR7      ;_uu_ 4        \        P                  ! V.4      V,            RRR4       R#   + '       g   i     EL(; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELv; i  + '       g   i     EL?; i  + '       g   i     L; i  + '       g   i     R# ; i)r&   ru   r'   r  r   z$cannot add PeriodArray and Timestampr   Nz(cannot add PeriodArray and DatetimeArrayzAunsupported operand type\(s\) for \+: 'Period' and 'DatetimeArrayzBunsupported operand type\(s\) for \+: 'DatetimeArray' and 'Period')r   r   re   rl   r-   r.   rb   r   r   r   r  )r2   r3   tsrz   r  r   s   &&    r    test_period_add_timestamp_raises:TestPeriodIndexArithmetic.test_period_add_timestamp_raisesG  s   vV#&hhuK0ooc24]]9C00H 1]]9C00H 1 9]]9C00&", 1]]9C00B4L3 1]]9C00"((B4.  1]]9C00HHbTNS  1 R\\)<CVC]]9C00",,t$$ 1R\\)<CWC]]9C00LL"$ 103 100000 100000000000 10 100s`   .	J#	J*J>KK&%K:	L-L!J'	*J;	>K	K#	&K7	:L	L	!L2	r]   r           )g       @g      @g      @)r   WrC  r"  )5ns5us5ms5s5min5h5D)Dr^   r_   r`   ra   r  r  r  r$  rb   rc   rd   r/  re   rb  r  rc  rp  Weekr9  r   to_pydatetimeto_datetime64rf   r  r/   r0   r@  rH  rM  rX  rl   rl  rs  rz  r}  int64r  r  r  r  r  operatoraddr   raddr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   _from_sequencer  r  r  r  rm   rn   ro   s   @r   r  r  r  s'    "- 0 [[S,/3 03 [[S,/[[ZZ)ZZ""O4ZZ  $'ZZ__i(		
0 00& [[ l#l#113l#113MM,<MM,6GHMM,<BBMM,lCIIHH_%	
"#"4"> [[Y(<=[[Z$5*  6 >* ^ [[URXXrxx$89  : < [[URXXrxx$89 ::-
- [[Va!288)D%EF+ G+0-$ [[[4-8* 9*$*$ [[\BHHbhh+?@[[THLL#((#;<0 = A0 [[\BHHbhh+?@ A"B [[Y(WX Y>
-
-2	-,	--- [[[4-8 9& [[HHeWq[1))5'A+XF	
F0*(#% #%r   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )TestPeriodSeriesArithmeticim  c                   \        \        R RR7      \        RRR7      .RR7      pVP                  R8X  g   Q h\        \        RRR7      \        RRR7      .RR7      p\        P                  ! W24      pV\
        P                  J d&   VP                  R8H  P                  4       '       g   Q h\        P                  ! WB4      pWQ,           p\        P                  ! Wd4       W,           p\        P                  ! Wd4       R	# )

2015-01-01r   r'   
2015-01-02xxxr   	Period[D]
2015-01-04
2015-01-05N)
r   r   r   r-   r.   re   r  dtypesallr1   )r2   r  r3   r   r6   r  r7   s   &&&    r   "test_parr_add_timedeltalike_scalar=TestPeriodSeriesArithmetic.test_parr_add_timedeltalike_scalarn  s    Ls+VLs-KL
 yyK'''Ls+VLs-KL

 ooc2R\\)JJ+-224444??8<!
)!
)r   c                   \        \        R RR7      \        RRR7      .RR7      pVP                  R8X  g   Q h\        RRR7      pVP                  p\        ^	V,          ^V,          .R\        R7      p\
        P                  ! W!,
          V4       \
        P                  ! W,
          RV,          4       \        \        R	RR7      \        R
RR7      .RR7      pVP                  R8X  g   Q h\        ^V,          ^V,          .R\        R7      p\
        P                  ! WQ,
          V4       \
        P                  ! W,
          RV,          4       R# )r  r   r'   r  r  r   r  z
2015-01-10r   r   r  r  NrZ   )r   r   r   r(   rT   r-   r   )r2   r   rz   r	  r6   s2s   &     r   test_ops_series_period1TestPeriodSeriesArithmetic.test_ops_series_period  s   Ls+VLs-KL
 yyK'''\,hh1s7AG,5G
sy(3
sy"x-8Ls+VLs-KL
 xx;&&&1s7AG,5G
rx2
sxh7r   r]   N)r^   r_   r`   ra   r  r  rm   rn   ro   s   @r   r  r  m  s     *28 8r   r  c                      a  ] tR tRt o RtR tR t]P                  P                  RRR.4      ]P                  P                  RR	 R
 R R R R R R .4      R 4       4       t
R tR tR tR tR tR tR tRtV tR# )TestPeriodIndexSeriesMethodsi  r   c                    \        V4      pV! V4      p\        P                  ! WS4       \        V4      pV! V4      p\        W1P                  R 7      p\        P
                  ! WW4       R# r   )r   r-   r1   r   r   r   )r2   rw   r   r6   r4   r7   r   r{   s   &&&&    r   r   #TestPeriodIndexSeriesMethods._check  sO    &!c
)VncXKK0
v+r   c                l   \        . R
ORRR7      p\        . RORRR7      pV P                  VR V4       V P                  VR V4       V P                  V^,           R V4       V\        R RR7      ,
          pVP                  p\        P
                  ! ^ V,          ^V,          ^V,          ^V,          .RR7      p\        P                  ! W54       \        R RR7      V,
          p\        P
                  ! ^ V,          RV,          RV,          RV,          .RR7      p\        P                  ! W54       R	# )r   ru   r4   r   c                     V ^,           # r  r]   rU   s   &r   rW   :TestPeriodIndexSeriesMethods.test_pi_ops.<locals>.<lambda>      1q5r   c                     ^V ,           # r'  r]   rU   s   &r   rW   r(    r)  r   c                     V ^,
          # r'  r]   rU   s   &r   rW   r(        q1ur   r'   r   Nr   )r   r   r   2011-06rZ   ra  )r   r   r   r(   re   rl   r-   r  )r2   r4   r6   r7   r	  r{   s   &     r   test_pi_ops(TestPeriodIndexSeriesMethods.test_pi_ops  s    8s
 8s
 	C(3C(3C!G_c2vic22hhhhCS!c'1s7;%H
f*	,s2hhCc28R#X>UK
f*r   ngstrg      ?r   c                    W,           # rR   r]   r  r1  s   &&r   rW   %TestPeriodIndexSeriesMethods.<lambda>      CHr   c                    W,           # rR   r]   r4  s   &&r   rW   r5        BHr   c                    W,
          # rR   r]   r4  s   &&r   rW   r5    r6  r   c                    W,
          # rR   r]   r4  s   &&r   rW   r5    r8  r   c                .    \         P                  ! W4      # rR   r/   r  r4  s   &&r   rW   r5    s    BFF3Or   c                .    \         P                  ! W4      # rR   r<  r4  s   &&r   rW   r5    s    BFF2Or   c                .    \         P                  ! W4      # rR   r/   subtractr4  s   &&r   rW   r5    s    BKK0r   c                .    \         P                  ! W4      # rR   r?  r4  s   &&r   rW   r5    s    BKK0r   c                
   \        . RORRR7      p\        P                  ! WC4      pRP                  . RO4      p\        P
                  ! \        VR7      ;_uu_ 4        V! WQ4       RRR4       R#   + '       g   i     R# ; i)	r   ru   r4   r   r>  r   Nr   )zunsupported operand type\(s\)zcan only concatenatezmust be strzobject to str implicitly)r   r-   r.   r?  rb   r   r   )r2   r1  r   r3   r4   r  r   s   &&&&   r   test_parr_ops_errors1TestPeriodIndexSeriesMethods.test_parr_ops_errors  sa     8s
 ooc2hh
 ]]9C00M 1000s   	A11B	c                N   \        . RORRR7      p\        . RORRR7      pV P                  VR V4       V P                  VR V4       V P                  VR V4       V P                  V^,           R V4       V P                  V^,           R V4       \        . ROR	RR7      p\        . ROR	RR7      pV P                  VR
 V4       V P                  VR V4       V P                  VR V4       V P                  V^,           R V4       V P                  V^,           R V4       R# )r   ru   r4   r   c                     V ^,           # r'  r]   rU   s   &r   rW   >TestPeriodIndexSeriesMethods.test_pi_ops_nat.<locals>.<lambda>  r)  r   c                     ^V ,           # r'  r]   rU   s   &r   rW   rG    r)  r   c                 0    \         P                  ! V ^4      # r'  r<  rU   s   &r   rW   rG        266!Q<r   c                     V ^,
          # r'  r]   rU   s   &r   rW   rG    r,  r   c                 0    \         P                  ! V ^4      # r'  r?  rU   s   &r   rW   rG        r{{1a'8r   r   c                     V ^,           # r  r]   rU   s   &r   rW   rG    r)  r   c                     ^V ,           # rO  r]   rU   s   &r   rW   rG    r)  r   c                 0    \         P                  ! V ^4      # rO  r<  rU   s   &r   rW   rG    rJ  r   c                     V ^,
          # rO  r]   rU   s   &r   rW   rG     r,  r   c                 0    \         P                  ! V ^4      # rO  r?  rU   s   &r   rW   rG    rM  r   Nr   r   r   r   )r   r   r   r-  )z2011-072011-08r   z2011-10r   r   )r2   r4   r6   s   &  r   test_pi_ops_nat,TestPeriodIndexSeriesMethods.test_pi_ops_nat  s   43U
 43U
 	C(3C(3C/:C!G_c2C!G8#> 44e
 44e
 	C(3C(3C/:C!G_c2C!G8#>r   c                N   \        . R	ORRR7      pR p\        . R
ORRR7      pV P                  WV4       R p\        . RORRR7      pV P                  WV4       R p\        . RORRR7      pV P                  WV4       R p\        . RORRR7      pV P                  WV4       R# )r   ru   r4   r   c                 @    V \         P                  ! . RO4      ,           # r  r  r/   r0   rU   s   &r   rW   DTestPeriodIndexSeriesMethods.test_pi_ops_array_int.<locals>.<lambda>      a"((<00r   c                 \    \         P                  ! V \         P                  ! . RO4      4      # )r  )r  rZ   r  r  )r/   r  r0   rU   s   &r   rW   r]    s    bffQ 78r   c                 @    V \         P                  ! . RO4      ,
          # r[  r\  rU   s   &r   rW   r]    r^  r   c                 \    \         P                  ! V \         P                  ! . RO4      4      # )r  )r  r  r  ra  )r/   r@  r0   rU   s   &r   rW   r]    s    bkk!RXXm%<=r   NrT  )r   r   r   rU  )r   r   r   r-  )2010-12rb  r   rb  )z2010-10rb  r   r-  rV  r2   r4   r   r{   s   &   r   test_pi_ops_array_int2TestPeriodIndexSeriesMethods.test_pi_ops_array_int  s    43U
 143U
 	CC 843U
 	CC 043U
 	CC =43U
 	CC r   c                   \        . RORRR7      pR p\        . R	ORRR7      pV P                  WV4       R p\        . R
ORRR7      pV P                  WV4       R p\        . RORRR7      pV P                  WV4       R# )r   r   r4   r   c                 L    V \         P                  P                  4       ,           # rR   re   rb  rq  rU   s   &r   rW   ATestPeriodIndexSeriesMethods.test_pi_ops_offset.<locals>.<lambda>%  s    a"**..**r   c                 N    V \         P                  P                  ^4      ,           # r'  rh  rU   s   &r   rW   ri  -      a"**..++r   c                 N    V \         P                  P                  ^4      ,
          # r'  rh  rU   s   &r   rW   ri  5  rk  r   Nr   z
2011-02-01z
2011-03-01z
2011-04-01)z
2011-01-02z
2011-02-02z
2011-03-02z
2011-04-02)r   z
2011-02-03z
2011-03-03z
2011-04-03)z
2010-12-30z
2011-01-30z
2011-02-27z
2011-03-30rV  rc  s   &   r   test_pi_ops_offset/TestPeriodIndexSeriesMethods.test_pi_ops_offset  s    D

 +D

 	CC +D

 	CC +D

 	CC r   c                   \        . RORRR7      p\        V4      pRpW3 F  p\        P                  ! \        VR7      ;_uu_ 4        V\
        P                  P                  ^4      ,            RRR4       \        P                  ! \        VR7      ;_uu_ 4        \
        P                  P                  ^4      V,            RRR4       \        P                  ! \        VR7      ;_uu_ 4        V\
        P                  P                  ^4      ,
           RRR4       K  	  R#   + '       g   i     L; i  + '       g   i     L|; i  + '       g   i     EK:  ; i)r   r   r4   r   zmCannot add/subtract timedelta-like from PeriodArray that is not an integer multiple of the PeriodArray's freqr   Nrm  )r   r   rb   r   r   re   rb  re  )r2   r4   r   r   r  s   &    r   test_pi_offset_errors2TestPeriodIndexSeriesMethods.test_pi_offset_errors=  s    D

 Sk< 	 :C4C@@bjjooa(( A 4C@@

"S( A 4C@@bjjooa(( A@ @@ A@ A@@s$   'D#'D6.'E	#D36E	Ec                V   \        . RORRR7      pV\        RRR7      ,
          pVP                  p\        P                  ! RV,          RV,          RV,          RV,          .RR7      p\
        P                  ! W$4       \        P                  ! V\        RRR7      4      p\
        P                  ! W$4       \        RRR7      V,
          p\        P                  ! ^V,          ^V,          ^
V,          ^	V,          .RR7      p\
        P                  ! W$4       \        P                  ! \        RRR7      V4      p\
        P                  ! W$4       \        \        P                  \        P                  \        P                  \        P                  .RRR7      pV\        R	RR7      ,
          p\
        P                  ! W$4       VP                  VP                  8X  g   Q h\        R	RR7      V,
          p\
        P                  ! W$4       VP                  VP                  8X  g   Q hR
# )r   ru   r4   r   2012-01r'   r   r  r  r   Nr   i)r   r   r(   re   rl   r-   r  r/   r@  r
   nanr2   r4   r7   r	  r{   s   &    r   test_pi_sub_period/TestPeriodIndexSeriesMethods.test_pi_sub_periodS  s   8s
 vic22hhhhc	39cCicBO
f*S&"=>
f*	,s2hhS"s(BHa#g>UK
f*VIC8#>
f*VVRVVRVVRVV,5
 ve#..
f*{{chh&&&C(3.
f*{{chh&&&r   c                   \        . RORRR7      p\        \        P                  .^,          RRR7      p\        P
                  ! \        P                  V,
          V4       \        P
                  ! V\        P                  ,
          V4       R# )r   ru   r4   r   r  r  NrT  )r   r
   re   r   r-   r  )r2   r4   r{   s   &  r   test_pi_sub_pdnat.TestPeriodIndexSeriesMethods.test_pi_sub_pdnats  s]    43U
 bffX\XF
bffslC0
cBFFlC0r   c                   \        . RORRR7      pV\        RRR7      ,
          pVP                  p\        P                  ! RV,          \        P
                  RV,          RV,          .RR7      p\        P                  ! W$4       \        RRR7      V,
          p\        P                  ! ^V,          \        P
                  ^
V,          ^	V,          .RR7      p\        P                  ! W$4       \        \        P                  \        P                  \        P                  \        P                  .RRR	7      p\        P                  ! V\        RRR7      ,
          V4       \        P                  ! \        RRR7      V,
          V4       R
# )r   r   ru   r4   r   rt  r'   r   r  r  Nr   ru  rv  rw  )r   r   r(   re   rl   r   r-   r  r
   r/   rx  ry  s   &    r   test_pi_sub_period_nat3TestPeriodIndexSeriesMethods.test_pi_sub_period_nat|  s   43U
 vic22hhhhc	26639b3h?eL
f*	,s2hhS"&&"s(AG<5I
f*VVRVVRVVRVV,5
 	cF5s$;;SA
fU5;SAr   r]   N)r^   r_   r`   ra   r   r   r/  rb   rc   rd   rC  rW  rd  rn  rq  rz  r}  r  rm   rn   ro   s   @r   r"  r"    s     <	,+. [[TE3<0[[$$$$++00		
 1"?<!8!<),'@1B Br   r"  )-r  numpyr/   rb   pandas._libs.tslibsr   r   r   r   pandasre   r   r   r	   r
   r   pandas._testing_testingr-   pandas.corer   pandas.core.arraysr   pandas.tests.arithmetic.commonr   r   r   rb  	YearBegin
MonthBeginrf  _common_mismatchfixtureto_pytimedeltar  r   r"   r$   rr   r   r   r   r  r  r"  r]   r   r   <module>r     s           -  JJJJ!JJ  ",,.
r3" 
	 
sC s**,s 
	* *Dh= h=V%1 %1P_! _!L(2 (2Vx% x%v18 18hnB nBr   