+
    &i(                     j   R t ^ RIt^ RIt^ RIHt ^ RIHtHtH	t	 ]P                  P                  R,          ]P                  P                  R,          ,           ]P                  P                  R,          ,           ]P                  P                  R,          ,           tRR	^ /R
/ RR^ /RRR/RRR/RRR/RRR/RRR/RRR/R/ R/ /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( R)4      t ! R* R+4      t ! R, R-4      tR. tR/ t]P6                  P9                  R0. R@O4      R1 4       t ! R2 R34      t]P6                  P9                  R0]P?                  4       4      R4 4       t R5 t!]P6                  P9                  R0^R6]"! 4       RR7R8.4      R9 4       t#]P6                  P9                  R0]P?                  4       4      R: 4       t$]P6                  P9                  R0]P?                  4       4      R; 4       t%]P6                  P9                  R<]4      ]P6                  P9                  R0]P?                  4       4      R= 4       4       t&]P6                  P9                  R>RARBRC/RD3RA^ RE/RF3RA^ RERGRH/RI3RA^^/RJ3.4      R? 4       t'R# )Kz(Tests for the array padding functions.

N)	_as_pairs)assert_allcloseassert_array_equalassert_equaluintintfloatcomplexconstantconstant_valuesedgelinear_ramp
end_valuesmaximumstat_lengthmeanmedianminimumreflectreflect_typeeven	symmetricwrapemptyc                   D   a  ] tR t^t o R tR tR tR tR tR t	Rt
V tR# )	TestAsPairsc                   \         P                  ! ^^..^
,          4      p^^.^..3 F  p\        V^
4      p\        W14       K  	  \	        4       p\        \        V^
4      \         P                  ! WD..^
,          4      4       R# )z Test casting for a single value.Nnparrayr   r   objectselfexpectedxresultobjs   &    [/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numpy/lib/tests/test_arraypad.pytest_single_valueTestAsPairs.test_single_value    st    88aVHrM*aSA3%Aq"%F* ! hc2HHsj\B&'	
    c                   \         P                  ! ^^..^
,          4      p^^.^^..3 F  p\        V^
4      p\        W14       K  	  \	        4       p\        \        RV.^
4      \         P                  ! RV..^
,          4      4       \        \        ^.^..^4      \         P                  ! ^^.^^..4      4       \        \        R.V..^4      \         P                  ! RR.WD..4      4       R# )z-Test proper casting for two different values.aNr   r!   s   &    r'   test_two_valuesTestAsPairs.test_two_values-   s     88aVHrM*a&Aq6(#Aq"%F* $ hsCj"%HHsCj\B&'	
 	sQCj!$HHq!fq!f%&	

 	usena(HHsCj3*-.	
r*   c                j    Rp\        \        R ^RR7      V4       \        \        R ^RR7      V4       R # )NFas_indexT)NNr2   r2   )r   r   r"   r#   s   & r'   test_with_noneTestAsPairs.test_with_noneF   s7    =dA.	
 	dA-	
r*   c                |    \         P                  ! ^4      P                  R4      p\        \	        V^4      V4       R# )z?Test if `x` already matching desired output are passed through.N)      )r   arangereshaper   r   r3   s   & r'   test_pass_throughTestAsPairs.test_pass_throughQ   s/    99R=((0h"	
r*   c           
     (   \        \        RR.^
RR7      \        P                  ! ^^..^
,          \        P                  R7      4       \        \        RR.^
RR7      \        P                  ! ^^..^
,          \        P                  R7      4       R
R
.R
..R
^.^R.R
^..^R
..^^..^	,          ^R..,           3 F>  p\
        P                  ! \        RR7      ;_uu_ 4        \        V^
RR7       R	R	R	4       K@  	  R	#   + '       g   i     KU  ; i)z Test results if `as_index=True`.g@gffffff
@Tr0   dtypeg(\@znegative valuesmatchN)r   r   r   r   intppytestraises
ValueError)r"   r$   s   & r'   test_as_indexTestAsPairs.test_as_indexY   s    sCj"t4HHq!fX]"''2	
 	sDk25HHq!fX]"''2	
 rdbTFRGaWAwi1b'q6(Q,1b'*,Az1BCC!R$/ DC,CCCs   #D  Dc                
   \         P                  ! \        RR7      ;_uu_ 4        \        ^...^
4       RRR4       \         P                  ! \        RR7      ;_uu_ 4        \        ^^.^^..^4       RRR4       \         P                  ! \        RR7      ;_uu_ 4        \        \        P
                  ! R4      ^4       RRR4       R#   + '       g   i     L; i  + '       g   i     Lr; i  + '       g   i     R# ; i)z"Ensure faulty usage is discovered.zmore dimensions than allowedr@   Nzcould not be broadcastr8      )rF   rG   rH   r   r   ones)r"   s   &r'   test_exceptionsTestAsPairs.test_exceptionsh   s    ]]:-KLLugr" M]]:-EFF1v1v&* G]]:-EFFbggfoq) GF	 MLFFFFFs#   C!C !C1C	C.	1D	 N)__name__
__module____qualname____firstlineno__r(   r-   r4   r;   rI   rO   __static_attributes____classdictcell____classdict__s   @r'   r   r      s(     

2	

0* *r*   r   c                     a  ] tR t^rt o ]P
                  P                  R]P                  4       4      R 4       t	]P
                  P                  R. RO4      R 4       t
]P
                  P                  R. RO4      R 4       tRtV tR# )TestConditionalShortcutsmodec           	         \         P                  ! ^x4      P                  ^^^4      pVP                   Uu. uF  pRNK  	  pp\	        V\         P
                  ! W$VR7      4       R# u upi )x   r\   N    ra   r   r9   r:   shaper   padr"   r\   test_pad_amts   &&   r'   test_zero_padding_shortcuts4TestConditionalShortcuts.test_zero_padding_shortcutss   sP    yy~%%aA.#'::.:a6:.4D!AB /s   A'c           
        \         P                  ! ^x4      P                  ^^^4      pVP                   Uu. uF  pRNK  	  pp\	        \         P
                  ! W$RR7      \         P
                  ! W$V^R7      4       R# u upi )r^   r   r_   r\   r   N   rn   rb   re   s   &&   r'   test_shallow_statistic_range5TestConditionalShortcuts.test_shallow_statistic_rangey   sa    yy~%%aA.#'::.:a6:.266$f=66$dJ	L /s   A>c           
        \         P                  ! ^4      P                  ^^4      pVP                   Uu. uF  pRNK  	  pp\	        \         P
                  ! W$VR7      \         P
                  ! W$V^R7      4       R# u upi )   r_   rl   N)rM   rM   rb   re   s   &&   r'   test_clip_statistic_range2TestConditionalShortcuts.test_clip_statistic_range   s_    yy}$$Q*#'::.:a6:.266$d;66$dK	M /s   A=rQ   N)r   r   r   r   )rR   rS   rT   rU   rF   markparametrize
_all_modeskeysri   ro   rs   rV   rW   rX   s   @r'   r[   r[   r   s     [[VZ__%67C 8C
 [[V%NOL PL [[V%NOM PMr*   r[   c                   N  a  ] tR t^t o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR t]P$                  P'                  R. RO4      R 4       t]P$                  P'                  R. RO4      ]P$                  P'                  R. RO4      R 4       4       tR t]P$                  P/                  R4      ]P$                  P/                  R4      ]P$                  P'                  RRR.4      R 4       4       4       t]P$                  P'                  RRR.4      R 4       tRtV tR# )TestStatisticc                
   \         P                  ! ^d4      P                  R4      p\         P                  ! VRjRRkR7      p\         P                  ! . RNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NR?NR@NRANRBNRCNRDNRENRFNRGNRHNRINRJNRKNRLNRMNRNNRONRPNRQNRRNRSNRTNRUNRVNRWNRXNRYNRZNR[NR\NR]NR^NR_NR`NRaNRbNRcNRdNReNRfNRgNRhNRgNRgNRgNRgNRgNRgNRgNRgNRgNRgNRgNRgNRgNRgNRgNRgNRgNRgNRgNRgN4      p\        W4       Ri# )ld   fr   r         ?              ?       @      @      @      @      @      @       @      "@      $@      &@      (@      *@      ,@      .@      0@      1@      2@      3@      4@      5@      6@      7@      8@      9@      :@      ;@      <@      =@      >@      ?@      @@     @@      A@     A@      B@     B@      C@     C@      D@     D@      E@     E@      F@     F@      G@     G@      H@     H@      I@     I@      J@     J@      K@     K@      L@     L@      M@     M@      N@     N@      O@     O@      P@     @P@     P@     P@      Q@     @Q@     Q@     Q@      R@     @R@     R@     R@      S@     @S@     S@     S@      T@     @T@     T@     T@      U@     @U@     U@     U@      V@     @V@     V@     V@      W@     @W@     W@     W@      X@     @X@     X@     X@N)      )rL   r   r9   astyperd   r   r   r"   r,   bs   &  r'   test_check_mean_stat_length)TestStatistic.test_check_mean_stat_length   s   IIcN!!#&FF1lF
CHHS # s C  c 3  S # !$&)+.0358:=!$ 	 	 	 	  	 "$	 &(	 *,	 .0	 24	
 
 
 
  
 "%
 '*
 ,/
 14
 69
 ;>      "% '* ,/ 14 69 ;>      "% '* ,/ 14 69 ;>      "% '* ,/ 14 69 ;>      "% '* ,/ 14 69 ;>      "% '* ,/ 14 69 ;>      "% '* ,/ 14 69 ;>      "% '* ,/ 14 69 ;>      "% '* ,/ 14 69 ;>      "% '* ,/ 14 69 ;>  !  !  !   !  "%!  '*!  ,/!  14!  69!  ;>!& 	1 r*   c                   \         P                  ! ^d4      p\         P                  ! VRR4      p\         P                  ! . ^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^ N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^ N^!N^"N^#N^$N^%N^&N^'N^(N^)N^*N^+N^,N^-N^.N^/N^0N^1N^2N^3N^4N^5N^6N^7N^8N^9N^:N^;N^<N^=N^>N^?N^@N^AN^BN^CN^DN^EN^FN^GN^HN^IN^JN^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN^cN4      p\	        W4       R# r|   r   Nr   r   r9   rd   r   r   r   s   &  r'   test_check_maximum_1"TestStatistic.test_check_maximum_1   s   IIcNFF1h	*HH5R 5 5R 5 5R 5 5R 5 5R 5 555555!#5%'5)+5-/513555555 	5 	5 	5 	5 	5 	5  !	5 #$	5 &'	5 )*	5
 5
 5
 5
 5
  5
 "$5
 &(5
 *,5
 .05
 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245  !5  !5  !5  !5   !5  "$!5  &(!5  *,!5  .0!5  24!5& 	1 r*   c                   \         P                  ! ^d4      ^,           p\         P                  ! VRR4      p\         P                  ! . ^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^ N^!N^"N^#N^$N^%N^&N^'N^(N^)N^*N^+N^,N^-N^.N^/N^0N^1N^2N^3N^4N^5N^6N^7N^8N^9N^:N^;N^<N^=N^>N^?N^@N^AN^BN^CN^DN^EN^FN^GN^HN^IN^JN^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN4      p\	        W4       R# r   r   r   s   &  r'   test_check_maximum_2"TestStatistic.test_check_maximum_2   s   IIcNQFF1h	*HH?S ?# ?s ?C ? ?c ?3 ? ?S ?# ?????!$?&)?+.?03?58?:=?????!$? 	? 	? 	? 	? 	? 	?  !	? #$	? &'	? )+	?
 ?
 ?
 ?
 ?
  ?
 "$?
 &(?
 *,?
 .0?
 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 25? ? ? ?  ? "%? '*? ,/? 14? 69? ;>?  !?  !?  !?   !?  "%!?  '*!?  ,/!?  14!?  69!?  ;>!?& 	1 r*   c                   \         P                  ! ^d4      ^,           p\         P                  ! VRR^
R7      p\         P                  ! . ^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^ N^!N^"N^#N^$N^%N^&N^'N^(N^)N^*N^+N^,N^-N^.N^/N^0N^1N^2N^3N^4N^5N^6N^7N^8N^9N^:N^;N^<N^=N^>N^?N^@N^AN^BN^CN^DN^EN^FN^GN^HN^IN^JN^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN^dN4      p\	        W4       R# )r|   r   r~   Nr   r   r   s   &  r'   test_check_maximum_stat_length,TestStatistic.test_check_maximum_stat_length   s   IIcNQFF1h	r:HH?R ? ?R ? ?R ? ?R ? ?R ? ??????!#?%'?)+?-/?13?????? 	? 	? 	? 	?  	? #$	? '(	? +,	? /0	? 24	?
 ?
 ?
 ?
 ?
  ?
 "$?
 &(?
 *,?
 .0?
 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 25? ? ? ?  ? "%? '*? ,/? 14? 69? ;>?  !?  !?  !?   !?  "%!?  '*!?  ,/!?  14!?  69!?  ;>!?& 	1 r*   c                   \         P                  ! ^d4      p\         P                  ! VRR4      p\         P                  ! . ^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^ N^!N^"N^#N^$N^%N^&N^'N^(N^)N^*N^+N^,N^-N^.N^/N^0N^1N^2N^3N^4N^5N^6N^7N^8N^9N^:N^;N^<N^=N^>N^?N^@N^AN^BN^CN^DN^EN^FN^GN^HN^IN^JN^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cN^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N4      p\	        W4       R# r|   r   Nr   r   r   s   &  r'   test_check_minimum_1"TestStatistic.test_check_minimum_1   s   IIcNFF1h	*HH+a +! +a +! +a +! +a +! +a +! ++++++"#+&'+*++./+23++++++ 	+ 	+ 	+ 	+  	+ #$	+ '(	+ +,	+ /0	+ 34	+
 +
 +
 +
 +
  +
 "$+
 &(+
 *,+
 .0+
 24+ + + + +  + "$+ &(+ *,+ .0+ 24+ + + + +  + "$+ &(+ *,+ .0+ 24+ + + + +  + "$+ &(+ *,+ .0+ 24+ + + + +  + "$+ &(+ *,+ .0+ 24+ + + + +  + "$+ &(+ *,+ .0+ 24+ + + + +  + "$+ &(+ *,+ .0+ 24+ + + + +  + "$+ &(+ *,+ .0+ 24+ + + + +  + "$+ &(+ *,+ .0+ 24+ + + + + + +  !+ #$+ &'+ )*+  !+  !+  !+  !+  !+  !+   !!+  #$!+  &'!+  )*!+& 	1 r*   c                   \         P                  ! ^d4      ^,           p\         P                  ! VRR4      p\         P                  ! . ^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^ N^!N^"N^#N^$N^%N^&N^'N^(N^)N^*N^+N^,N^-N^.N^/N^0N^1N^2N^3N^4N^5N^6N^7N^8N^9N^:N^;N^<N^=N^>N^?N^@N^AN^BN^CN^DN^EN^FN^GN^HN^IN^JN^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cN^dN^eN^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N4      p\	        W4       R# r   r   r   s   &  r'   test_check_minimum_2"TestStatistic.test_check_minimum_2  s   IIcNQFF1h	*HH+a +! +a +! +a +! +a +! +a +! ++++++"#+&'+*++./+23++++++ 	+ 	+ 	+ 	+  	+ #$	+ '(	+ +,	+ .0	+ 24	+
 +
 +
 +
 +
  +
 "$+
 &(+
 *,+
 .0+
 24+ + + + +  + "$+ &(+ *,+ .0+ 24+ + + + +  + "$+ &(+ *,+ .0+ 24+ + + + +  + "$+ &(+ *,+ .0+ 24+ + + + +  + "$+ &(+ *,+ .0+ 24+ + + + +  + "$+ &(+ *,+ .0+ 24+ + + + +  + "$+ &(+ *,+ .0+ 24+ + + + +  + "$+ &(+ *,+ .0+ 24+ + + + +  + "$+ &(+ *,+ .1+ 36+ + + + + + +  !+ #$+ &'+ )*+  !+  !+  !+  !+  !+  !+   !!+  #$!+  &'!+  )*!+& 	1 r*   c                   \         P                  ! ^d4      ^,           p\         P                  ! VRR^
R7      p\         P                  ! . ^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^ N^!N^"N^#N^$N^%N^&N^'N^(N^)N^*N^+N^,N^-N^.N^/N^0N^1N^2N^3N^4N^5N^6N^7N^8N^9N^:N^;N^<N^=N^>N^?N^@N^AN^BN^CN^DN^EN^FN^GN^HN^IN^JN^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cN^dN^[N^[N^[N^[N^[N^[N^[N^[N^[N^[N^[N^[N^[N^[N^[N^[N^[N^[N^[N^[N4      p\	        W4       R# )r|   r   r~   Nr   r   r   s   &  r'   test_check_minimum_stat_length,TestStatistic.test_check_minimum_stat_length  s   IIcNQFF1h	r:HH5a 5! 5a 5! 5a 5! 5a 5! 5a 5! 555555"#5&'5*+5./523555555 	5 	5 	5 	5  	5 #$	5 '(	5 +,	5 /0	5 24	5
 5
 5
 5
 5
  5
 "$5
 &(5
 *,5
 .05
 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 255 5 5 5 5  5 "$5 &(5 *,5 .05 245  !5  !5  !5  !5   !5  "$!5  &(!5  *,!5  .0!5  24!5& 	1 r*   c                   \         P                  ! ^d4      P                  R4      p\         P                  ! VRiR4      p\         P                  ! . RNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NR?NR@NRANRBNRCNRDNRENRFNRGNRHNRINRJNRKNRLNRMNRNNRONRPNRQNRRNRSNRTNRUNRVNRWNRXNRYNRZNR[NR\NR]NR^NR_NR`NRaNRbNRcNRdNReNRfNRgNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRN4      p\        W4       Rh# )jr|   r}   r        H@r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Nr   r   r   s   &  r'   test_check_medianTestStatistic.test_check_median1  sO   IIcN!!#&FF1h)HHIT I4 I It IT I4 I It IT I4 IIII#I%)I+/I15I7;I=AICGIIII#I%)I 	I 	I 	I 	I  	I "$	I &(	I *,	I .0	I 24	I
 I
 I
 I
  I
 "%I
 '*I
 ,/I
 14I
 69I
 ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  $I &*I ,0I 26I 8<I >BI DHI  !I  !I  !I   $!I  &*!I  ,0!I  26!I  8<!I  >B!I  DH!I& 	1 r*   c                    \         P                  ! . RO. RO. RO.4      p\         P                  ! V^R4      p\         P                  ! . RO. RO. RO. R	O. RO.4      p\        W4       R# )
rM   r   NrM   rn      r     	   r     r8   )r  r  r
  r  r  rM   rM   rn   r  rM   r
  r  r
  r  r
  r  r  r  r8   r  )r   r   rd   r   r   s   &  r'   test_check_median_01"TestStatistic.test_check_median_01I  sU    HHiI67FF1a"HH 	1 r*   c                    \         P                  ! . RO. RO. RO.4      p\         P                  ! VP                  ^R4      P                  p\         P                  ! . RO. RO. RO. R	O. RO.4      p\	        W4       R# )
rM   r   Nr  r	  r  )r
  r  r
  r  r
  r  r  r  )r   r   rd   Tr   r   s   &  r'   test_check_median_02"TestStatistic.test_check_median_02W  s_    HHiI67FF1338$&&HH 	1 r*   c                   \         P                  ! ^d4      P                  R4      pRV^&   RV^a&   \         P                  ! VRgRRhR7      p\         P                  ! . RNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NR?NR@NRANRBNRCNRDNRENRFNRGNRHNRINRJNRKNRLNRMNRNNRONRPNRQNRRNRSNRTNRUNRVNRWNRXNRYNRZNR[NR\NR]NR^NR_NR`NRaNRbNRcNRNRNRdNReNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRN4      p\        W4       Rf# )ir|   r}   r   r   r   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Nr   rM   r
  r   r   s   &  r'   test_check_median_stat_length+TestStatistic.test_check_median_stat_lengthe  s   IIcN!!#&!"FF1hf=HH?b ?2 ? ?R ?" ?r ?B ? ?b ?2 ?????"$?')?,.?13?68?;=?????"$? 	? 	? 	?  	? #%	? (*	? -/	? 24	? 79	? <>	?
 ?
 ?
 ?
  ?
 "%?
 '*?
 ,/?
 14?
 69?
 ;>? ? ? ?  ? "%? '*? ,/? 14? 69? ;>? ? ? ?  ? "%? '*? ,/? 14? 69? ;>? ? ? ?  ? "%? '*? ,/? 14? 69? ;>? ? ? ?  ? "%? '*? ,/? 14? 69? ;>? ? ? ?  ? "%? '*? ,/? 14? 69? ;>? ? ? ?  ? "%? '*? ,/? 14? 69? ;>? ? ? ?  ? "%? '*? ,/? 14? 69? ;>? ? ? ?  ? "%? '*? ,/? 14? 69? ;>? ? ? ?  ? "%? '*? ,/? 14? 69? ;>?  !?  !?  !?   !?  "%!?  '*!?  ,/!?  14!?  69!?  ;>!?& 	1 r*   c                    . RO.p\         P                  ! VRR^R7      p\         P                  ! . RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO.4      p\        W4       R# )r  r   r~   Nr  r
  r7   r
     )r  r  r  r  r  r  r
  r7   r7   r7   r7   r7   r7   r7   r7   r   rd   r   r   r   s   &  r'   test_check_mean_shape_one'TestStatistic.test_check_mean_shape_one  sa    KFF1ff!4HH:::::::::::::<" 	1 r*   c                   \         P                  ! ^d4      P                  R4      p\         P                  ! VRiR4      p\         P                  ! . RNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NR?NR@NRANRBNRCNRDNRENRFNRGNRHNRINRJNRKNRLNRMNRNNRONRPNRQNRRNRSNRTNRUNRVNRWNRXNRYNRZNR[NR\NR]NR^NR_NR`NRaNRbNRcNRdNReNRfNRgNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRN4      p\        W4       Rh# )jr|   r}   r   r  r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Nr   r   r   s   &  r'   test_check_mean_2TestStatistic.test_check_mean_2  sO   IIcN!!#&FF1h'HHIT I4 I It IT I4 I It IT I4 IIII#I%)I+/I15I7;I=AICGIIII#I%)I 	I 	I 	I 	I  	I "$	I &(	I *,	I .0	I 24	I
 I
 I
 I
  I
 "%I
 '*I
 ,/I
 14I
 69I
 ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  I "%I '*I ,/I 14I 69I ;>I I I I  $I &*I ,0I 26I 8<I >BI DHI  !I  !I  !I   $!I  &*!I  ,0!I  26!I  8<!I  >B!I  DH!I& 	1 r*   r\   r   r   r   r   c                    \         P                  ! . RO4      \         P                  ! . RO\         P                  R7      ,           p\         P                  ! VRV4      p\	        V^ ,          VR,          4       R# )z2Test that appended and prepended values are equal r>   N)r&  r8   r&  )ra   g-q=ra   rm   )r   r   float64rd   r   )r"   r\   r,   s   && r'   test_same_prepend_append&TestStatistic.test_same_prepend_append  sJ     HH[!BHH]"**$MMFF1fd#QqT1R5!r*   r   c           	        \         P                  ! ^4      P                  R4      pRp\        P                  ! \
        VR7      ;_uu_ 4        \         P                  ! V^WR7       RRR4       R#   + '       g   i     R# ; i)rr   #index can't contain negative valuesr@   r~   Nr7   r
  r   r9   r:   rF   rG   rH   rd   )r"   r\   r   arrrA   s   &&&  r'   test_check_negative_stat_length-TestStatistic.test_check_negative_stat_length  sQ    
 iim##F+5]]:U33FF349 4333s   A00B	c                   \         P                  ! ^4      p\         P                  ! VR4      p\         P                  ! VRRRR7      p\         P                  ! . RO. RO. RO. RO. R	O. R
O. RO. RO. RO. RO. RO.4      p\        W4       R# )rr   r   rl   Nr,  rL   rM   r8   rM   )
r7   r7   r7   r
  r7   r  r  r  r  r  )
rn   rn   rn   ra   rn   r8   rM   r  rM   rM   )
   r5  r5  
   r5           r8  r8  )
   r:  r:     r:           r=  r=  )
   r?  r?  r   r?           rA  rA  )
   rC  rC  r   rC           rE  rE  r   r9   r:   rd   r   r   r   s   &  r'   test_simple_stat_length%TestStatistic.test_simple_stat_length  sr    IIbMJJq&!FF1&VFHH++++55555557 	1 r*   z)ignore:Mean of empty slice:RuntimeWarningzCignore:invalid value encountered in( scalar)? divide:RuntimeWarningc                    \         P                  ! R R.RV^ R7      p\         P                  ! \         P                  R R\         P                  \         P                  .4      p\	        W#4       R# )r   r   r~   Nrn   r8   )r   rd   r   nanr   )r"   r\   r.  r#   s   &&  r'   test_zero_stat_length_valid)TestStatistic.test_zero_stat_length_valid  sI     ffb"Xvt;88RVVRRVVRVV<=S#r*   c           	        R p\         P                  ! \        VR7      ;_uu_ 4        \        P                  ! RR.^ V^ R7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        P                  ! RR.^ VRR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        P                  ! RR.^V^ R7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        P                  ! RR.^VRR7       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)z,stat_length of 0 yields no value for paddingr@   r   r   r~   N)rn   ra   rF   rG   rH   r   rd   r"   r\   rA   s   && r'   test_zero_stat_length_invalid+TestStatistic.test_zero_stat_length_invalid  s    >]]:U33FFB8Q!4 4]]:U33FFB8Q&9 4]]:U33FFB8Q!4 4]]:U33FFB8Q&9 43 433333333s/   D)0D<9EE")D9	<E	E	"E3	rQ   N)r   r   r   r   rD   )rD   )rM   r&  )r
  r8   )rD   rM   ))rC   r8   )rR   rS   rT   rU   r   r   r   r   r   r   r   r  r  r  r  r   r#  rF   ru   rv   r(  r/  rH  filterwarningsrM  rR  rV   rW   rX   s   @r'   rz   rz      sB    !0!0!0!0!0!0!0!0!!!4!,!0 [[V & "" [[V%MN[[M: O:!* [[ KL[[M [[Vfh%78$ 9 M
$
 [[Vi%;<	: =	:r*   rz   c                   \   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tRtV tR# )TestConstanti  c                   \         P                  ! ^d4      p\         P                  ! VRRRR7      p\         P                  ! . ^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^
N^ N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^ N^!N^"N^#N^$N^%N^&N^'N^(N^)N^*N^+N^,N^-N^.N^/N^0N^1N^2N^3N^4N^5N^6N^7N^8N^9N^:N^;N^<N^=N^>N^?N^@N^AN^BN^CN^DN^EN^FN^GN^HN^IN^JN^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cN^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N4      p\	        W4       R# )r|   r
   r   Nr   )r6  r   r   r   s   &  r'   test_check_constant TestConstant.test_check_constant  s   IIcNFF1h
HEHH5R 5 5R 5 5R 5 5R 5 5R 5 555555!#5%'5)+5-/513555555 	5 	5 	5 	5 	5 	5  !	5 #$	5 &'	5 )*	5
 5
 5
 5
 5
  5
 "$5
 &(5
 *,5
 .05
 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245  !5  !5  !5  !5   !5  "$!5  &(!5  *,!5  .0!5  24!5& 	1 r*   c                   \         P                  ! ^d4      p\         P                  ! VRR4      p\         P                  ! . ^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^ N^!N^"N^#N^$N^%N^&N^'N^(N^)N^*N^+N^,N^-N^.N^/N^0N^1N^2N^3N^4N^5N^6N^7N^8N^9N^:N^;N^<N^=N^>N^?N^@N^AN^BN^CN^DN^EN^FN^GN^HN^IN^JN^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cN^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N^ N4      p\	        W4       R# )r|   r
   Nr   r   r   s   &  r'   test_check_constant_zeros&TestConstant.test_check_constant_zeros
  s   IIcNFF1h
+HH5a 5! 5a 5! 5a 5! 5a 5! 5a 5! 555555"#5&'5*+5./523555555 	5 	5 	5 	5 	5 	5  !	5 #$	5 &'	5 )*	5
 5
 5
 5
 5
  5
 "$5
 &(5
 *,5
 .05
 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 #$5 '(5 +,5 /05 345  !5  !5  !5  !5   !5  #$!5  '(!5  +,!5  /0!5  34!5& 	1 r*   c                    \         P                  ! ^4      P                  ^^4      p\         P                  ! VRRRR7      p\         P                  ! . RO. RO. RO. R	O. R
O. RO. RO. RO.4      p\        W#4       R# )rr   r
   皙?r\   r   NrK  )	rn   rn   rn   rn   rn   rn   rn   rn   rn   )	rn   ra   rn   r8   rM   r  r
  rn   rn   )	rn   r7   r  r  r  r6  r5  rn   rn   )	rn   r7  r8  r9  r;  r:  r<  rn   rn   )	rn   r=  r>  r   r?  r@  rA  rn   rn   )	rn   rB  r   rC  rD  rE  rF  rn   rn   r   r9   r:   rd   r   r   r"   r.  rf   r#   s   &   r'   test_check_constant_float&TestConstant.test_check_constant_float"  sj     iim##Aq)vvc6
#&(8800000000	2 	'r*   c                6   \         P                  ! ^4      P                  ^^4      pVP                  \         P                  4      p\         P
                  ! VRRRR7      p\         P                  ! . RO. RO. RO. R	O. R
O. RO. RO. RO.4      p\        W44       R# )rr   r
   rb  rc  NrK  rK  )	rb  rb  rb  rb  rb  rb  rb  rb  rb  )	rb  r   r   r   r   r   r   rb  rb  )	rb  r   r   r   r   r   r   rb  rb  )	rb  r   r   r   r   r   r   rb  rb  )	rb  r   r   r   r   r   r   rb  rb  )	rb  r   r   r   r   r   r   rb  rb  r   r9   r:   r   r'  rd   r   r   )r"   r.  	arr_floatrf   r#   s   &    r'   test_check_constant_float2'TestConstant.test_check_constant_float26  s~     iim##Aq)JJrzz*	vvi!1
#&(88JJJJJJJJ	L 	'r*   c                   \         P                  ! ^d\        R7      p\         P                  ! VRRRR7      p\         P                  ! . RNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRN^ N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^ N^!N^"N^#N^$N^%N^&N^'N^(N^)N^*N^+N^,N^-N^.N^/N^0N^1N^2N^3N^4N^5N^6N^7N^8N^9N^:N^;N^<N^=N^>N^?N^@N^AN^BN^CN^DN^EN^FN^GN^HN^IN^JN^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRN4      p\        W4       R# )	r|   r>   r
   r[  Nr   皙333333)ro  rp  )r   r9   r   rd   r   r   r   s   &  r'   test_check_constant_float3'TestConstant.test_check_constant_float3K  sI   IIc'FF1h
LIHHIT I4 I It IT I4 I It IT I4 IIII#I%)I+/I15I7;I=AICGIIII#I%)I 	I 	I 	I 	I 	I "#	I &'	I *+	I ./	I 23	I
 I
 I
 I
 I
  I
 "$I
 &(I
 *,I
 .0I
 24I I I I I  I "$I &(I *,I .0I 24I I I I I  I "$I &(I *,I .0I 24I I I I I  I "$I &(I *,I .0I 24I I I I I  I "$I &(I *,I .0I 24I I I I I  I "$I &(I *,I .0I 24I I I I I  I "$I &(I *,I .0I 24I I I I I  I "$I &(I *,I .0I 24I I I I I  I "$I &(I *,I .0I 24I I I I  $I &*I ,0I 26I 8<I >BI DHI  !I  !I  !I   $!I  &*!I  ,0!I  26!I  8<!I  >B!I  DH!I& 	r*   c           
         \         P                  ! ^4      P                  ^^4      p\         P                  ! VRR^R7      p\         P                  ! . RO. RO. RO. RO. R	O. R
O. RO.4      p\        W#4       R# )rr   r
   rc  N)rn   rV  )
rM   rM   rM   rM   rM   rM   rM   rM   rM   rM   )
rM   rM   ra   rn   r8   rM   r  r
  rM   rM   )
rM   rM   r7   r  r  r  r6  r5  rM   rM   )
rM   rM   r7  r8  r9  r;  r:  r<  rM   rM   )
rM   rM   r=  r>  r   r?  r@  rA  rM   rM   )
rM   rM   rB  r   rC  rD  rE  rF  rM   rM   rd  re  s   &   r'   "test_check_constant_odd_pad_amount/TestConstant.test_check_constant_odd_pad_amountc  se    iim##Aq)vvc<j#$&8844444446
 	'r*   c                    \         P                  ! ^4      P                  ^^4      p\         P                  ! VRRRR7      p\         P                  ! . RO. RO. RO. R	O. R	O.4      p\        W#4       R# )
r  r
   rc  N)rK  rn   rM   )rK  rM   r  )rM   rn   rn   r  r  r  )rM   ra   rn   r  r  r  )rM   r8   rM   r  r  r  )rM   r8   r8   r  r  r  rd  re  s   &   r'   test_check_constant_pad_2d'TestConstant.test_check_constant_pad_2dt  s`    iil""1a(vvc+**:<88	!
 	'r*   c                   Rp\         P                  ! ^V\         P                  R7      p\         P                  ! V^RVP	                  4       R7      p\         P                  ! ^V\         P                  R7      p\        W44       Rp\         P                  ! ^V\         P                  R7      p\         P                  ! V^RVP	                  4       R7      p\         P                  ! ^V\         P                  R7      p\        W44       R# )r8   r>   r
   rc  Nl    l    )r   fulluint64rd   minr   int64)r"   
uint64_maxr.  rf   r#   	int64_maxs   &     r'   test_check_large_integers&TestConstant.test_check_large_integers  s     
gga2995vvc1:swwyI771j		:4*	gga"((3vvc1:swwyI771irxx84*r*   c                   \         P                  ! ^\        R7      p\        4       pW!^ &   \        4       p\        4       p\         P                  ! V^RW43R7      p\         P                  ! R\        R7      pW5^ &   W%^&   WE^&   \	        W4       R# )rn   r>   r
   )	pad_widthr\   r   Nr4  )r   r   r    rd   r   )r"   r.  obj_aobj_bobj_cr#   s   &     r'   test_check_object_array$TestConstant.test_check_object_array  sv    hhq'AffSAJ&+^5 88D/3)r*   c                    \         P                  ! R4      p\         P                  ! V. RORR7      pVP                  R8X  g   Q hR# )rM   r
   r_   NrM   ra   r8   ra   rV  rt  rM   r  r  r   zerosrd   rc   r"   r.  r%   s   &  r'   test_pad_empty_dimension%TestConstant.test_pad_empty_dimension  s5    hhy!/jA||y(((r*   rQ   N)rR   rS   rT   rU   r\  r_  rf  rl  rq  ru  rz  r  r  r  rV   rW   rX   s   @r'   rY  rY    s<     !0!0(((*0("(+* ) )r*   rY  c                      a  ] tR tRt o R tR t]P                  P                  ]	3R7      R 4       t
R t]P                  P                  R]4      R 4       tR	tV tR
# )TestLinearRampi  c                   \         P                  ! ^d4      P                  R4      p\         P                  ! VRRRR7      p\         P                  ! . RNRNRNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NRNR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NR?NR@NRANRBNRCNRDNRENRFNRGNRHNRINRJNRKNRLNRMNRNNRONRPNRQNRRNRSNRTNRUNRVNRWNRXNRYNRZNR[NR\NR]NR^NR_NR`NRaNRbNRcNRdNReNRfNRgNRhNRiNRjNRkNRlNRmNRnNRoNRpNRqNRrNRsNRtNRuNRvNRwNRxNRyNRzNR{NR|NR}NR~NRNRNRNRNRNRNRNRNRNRNRPNRNRNRNRNRNRNRNRNRNR!N4      p\        WRRR7       R# )r|   r}   r   )r   r   gQ@gq=
ףp@g)\(@gzG
@g	@gRQ@g
ףp=
@g(\@g{Gz@g333333@gQ@gp=
ף @gQ?g)\(?g?g
ףp=
?g{Gz?gQ?gQ?g?g{Gz?gQ?g{Gz?g{Gz?r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   g33333W@gffffffV@g9U@gT@g     R@g33333Q@gfffffP@g33333N@gYL@gfffffG@gLE@g33333B@g@@g     <@g7@g3@g,@gffffff#@gh㈵>)rtolatolNr   )r  r
  )r   r9   r   rd   r   r   r   s   &  r'   test_check_simple TestLinearRamp.test_check_simple  ss   IIcN!!#&FF1h&AHHFT F4 F Ft FT F4 F Ft FT F4 FFFF#F%)F+/F15F7;F=AFCGFFFF#F%)F 	F 	F 	F  $	F &*	F ,0	F 26	F 8<	F >B	F DH	F
 F
 F
 F
  $F
 &*F
 ,0F
 26F
 8<F
 >BF
 DHF F F F  $F &*F ,0F 26F 8<F >BF DHF F F F  $F &*F ,0F 26F 8<F >BF DHF F F F  $F &*F ,0F 26F 8<F >BF DHF F F F  $F &*F ,0F 26F 8<F >BF DHF F F F  $F &*F ,0F 26F 8<F >BF DHF F F F  $F &*F ,0F 26F 8<F >BF DHF F F F  $F &*F ,0F 26F 8<F >BF DHF F F F  $F &*F ,0F 26F 8<F >BF DHF F F F  $F &*F ,0F 26F 8<F >BF DHF  !F  !F  !F   $!F  &*!F  ,0!F  26!F  8<!F  >A!F  CE!F& 	4d3r*   c                2   \         P                  ! ^4      P                  ^^4      P                  \         P                  4      p\         P
                  ! VRRRR7      p\         P                  ! . RO. RO. RO. R	O. R
O. RO. RO. RO.4      p\        W#4       R# )r   r   r\   r   N)r8   r8   r`   )	r   r   r   r   r   r   r   r   r   )	r   r   r   r   r   g      ?r   r   r   )	r   r   r   r   r   r   r   r   r   )	r   g      @r   r   r   r   r   g      @r   )	r   r   r   r   r   r   r   r   r   )	r         @r   r   r   r   r         #@r   )	r   g      @r  r   g      !@r   r  g      @r   rj  re  s   &   r'   test_check_2dTestLinearRamp.test_check_2d  sv    iim##Aq)00<vvc6&I88BBBBBBBBDE 	'r*   )
exceptionsc                D   ^ RI Hp \        P                  ! V! ^^4      V! R^4      .4      p\        P                  ! VRR^ R7      p\        P                  ! V! ^ ^4      V! ^^4      V! ^^4      V! R^4      V! R^4      V! R	^4      V! ^ ^4      .4      p\        W44       R# )
ra   )Fractionr   r  Nr&  rL   rC   rD   )	fractionsr  r   r   rd   r   )r"   r  r.  actualr#   s   &    r'   test_object_array TestLinearRamp.test_object_array  s    &hhAQ89V-AF 88aaaRRRR
  	V&r*   c                   \         P                  ! \         P                  ! ^
4      P                  ^^4      RRR7      p\	        VR,          R4       \	        VR,          R4       \	        VR,          R4       \	        VR	,          R4       R# )
z!Ensure that end values are exact.r   r_   r   N)   {   )NNNra   )r  r&  )ra   r  )r&  r  )r   rd   rN   r:   r   )r"   r,   s   & r'   test_end_valuesTestLinearRamp.test_end_values  sa    FF2772;&&q!,j}MQtWb!QuXr"QtWb!QuXr"r*   r?   c                f   \         P                  ! ^.VR7      p\         P                  ! V^R^ R7      p\         P                  ! . ROVR7      p\        W44       \         P                  ! ^ .VR7      p\         P                  ! V^R^R7      p\         P                  ! . ROVR7      p\        W44       R# )a  
Check correct behavior of unsigned dtypes if there is a negative
difference between the edge to pad and `end_values`. Check both cases
to be independent of implementation. Test behavior for all other dtypes
in case dtype casting interferes with complex dtypes. See gh-14191.
r>   r   r  N)ra   rn   r8   rM   r8   rn   ra   )rM   r8   rn   ra   rn   r8   rM   )r   r   rd   r   )r"   r?   r$   r%   r#   s   &&   r'   test_negative_difference'TestLinearRamp.test_negative_difference  s     HHaS&1=Q?881?V&HHaS&1=Q?881?V&r*   rQ   N)rR   rS   rT   rU   r  r  rF   ru   xfailAssertionErrorr  r  rv   _numeric_dtypesr  rV   rW   rX   s   @r'   r  r    sb     40( [[>"34' 5'$# [[Wo6' 7'r*   r  c                   b   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tRtV tR# )TestReflecti  c                   \         P                  ! ^d4      p\         P                  ! VRR4      p\         P                  ! . ^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^
N^	N^N^N^N^N^N^N^N^N^ N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^ N^!N^"N^#N^$N^%N^&N^'N^(N^)N^*N^+N^,N^-N^.N^/N^0N^1N^2N^3N^4N^5N^6N^7N^8N^9N^:N^;N^<N^=N^>N^?N^@N^AN^BN^CN^DN^EN^FN^GN^HN^IN^JN^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cN^bN^aN^`N^_N^^N^]N^\N^[N^ZN^YN^XN^WN^VN^UN^TN^SN^RN^QN^PN^ON4      p\	        W4       R# )r|   r   Nr   r   r   s   &  r'   r  TestReflect.test_check_simple  s   IIcNFF1h	*HH5R 5 5R 5 5R 5 5R 5 5R 5 555555!#5%&5()5+,5./555555 	5 	5 	5 	5 	5 	5  !	5 #$	5 &'	5 )*	5
 5
 5
 5
 5
  5
 "$5
 &(5
 *,5
 .05
 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245  !5  !5  !5  !5   !5  "$!5  &(!5  *,!5  .0!5  24!5& 	1 r*   c                   \         P                  ! ^d4      p\         P                  ! VRRRR7      p\         P                  ! . RNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRN^ N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^ N^!N^"N^#N^$N^%N^&N^'N^(N^)N^*N^+N^,N^-N^.N^/N^0N^1N^2N^3N^4N^5N^6N^7N^8N^9N^:N^;N^<N^=N^>N^?N^@N^AN^BN^CN^DN^EN^FN^GN^HN^IN^JN^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cN^dN^eN^fN^gN^hN^iN^jN^kN^lN^mN^nN^oN^pN^qN^rN^sN^tN^uN^vN^wN4      p\	        W4       R# )r|   r   oddr   Nr   ir  rC   rB   rD   r&  r   r   s   &  r'   test_check_odd_method!TestReflect.test_check_odd_method  s   IIcNFF1h	>HH?S ?# ?s ?C ? ?c ?3 ? ?S ?# ?????!$?&)?+-?/1?35?79?????? 	? 	? 	? 	? 	? 	?  !	? #$	? &'	? )*	?
 ?
 ?
 ?
 ?
  ?
 "$?
 &(?
 *,?
 .0?
 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ?  ? "%? '*? ,/? 14? 69? ;>?  !?  !?  !?   !?  "%!?  '*!?  ,/!?  14!?  69!?  ;>!?& 	1 r*   c                    . RO. RO.p\         P                  ! VRR4      p\         P                  ! . RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO.4      p\        W4       R# )r  r   Nr  r7   r  r  r  )r  r7   r  r  r  r7   r  r  r  r7   r  r  r  r7   r  r
  r  r
  r7   r
  r  r
  r7   r
  r  r
  r7   r
  r  r
  r  r   s   &  r'   test_check_large_pad TestReflect.test_check_large_pad*  se    	"FF1fi(HH::::::::::::::<$ 	1 r*   c                    . RO.p\         P                  ! VRR4      p\         P                  ! . RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO.4      p\        W4       R# )r  r   Nr  r  r  r  r   s   &  r'   test_check_shapeTestReflect.test_check_shapeA  s_    KFF1fi(HH:::::::::::::<" 	1 r*   c                    \         P                  ! . RO^R4      p\         P                  ! . RO4      p\        W4       R# )rn   r   Nrn   r8   rM   )rM   r8   rn   r8   rM   r8   rn   r  r   s   &  r'   test_check_01TestReflect.test_check_01W  s+    FF9a+HH*+1 r*   c                    \         P                  ! . RO^R4      p\         P                  ! . RO4      p\        W4       R# )rn   r   Nr  )	r8   rM   r8   rn   r8   rM   r8   rn   r8   r  r   s   &  r'   test_check_02TestReflect.test_check_02\  s+    FF9a+HH011 r*   c                    \         P                  ! . RO^R4      p\         P                  ! . RO4      p\        W4       R# )rn   r   Nr  )rn   r8   rM   r8   rn   r8   rM   r8   rn   r8   rM   r  r   s   &  r'   test_check_03TestReflect.test_check_03a  s+    FF9a+HH671 r*   c                    \         P                  ! . RO^^
.R4      p\         P                  ! . RO4      p\        W4       R# )rn   r   Nr  )r8   rn   r8   rM   r8   rn   r8   rM   r8   rn   r8   rM   r8   rn   r  r   s   &  r'   test_check_04TestReflect.test_check_04f  s/    FF9q"gy1HH?@1 r*   c                l   \         P                  ! . RO^-^
.R4      p\         P                  ! . ^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N4      p\        W4       R# )rn   r   Nrn   r8   rM   r  r  r   s   &  r'   test_check_05TestReflect.test_check_05k  s=   FF<"b95HH(Q ( (1 (a ( (A (q (! (Q ( ((((((( ("#(%&(()((((((( ("#(%&(()( ( ( ( ( ( (  !( #$( &'( )*( 	( 	( 	( 	( 	( 	(  !	( #$	( &'	( )*	(
 (
 (
 (
 (
 (
 (
  !(
 #$(
 &'() 	1 r*   c                    \         P                  ! . RO^^.R4      p\         P                  ! . RO4      p\        W4       R# )rn   r   Nr  )r8   rM   r  r  rM   r8   rn   rn   r8   rM   r  r  rM   r8   rn   rn   r8   rM   r  r  rM   r  r   s   &  r'   test_check_06TestReflect.test_check_06v  s5    FF<"a+6HH

 	1 r*   c                X   \         P                  ! . RO^-^.R4      p\         P                  ! . ^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N4      p\        W4       R# )rn   r   N)rn   r8   rM   r  r
  r7   r  r   s   &  r'   test_check_07TestReflect.test_check_07  s   FF%Aw<HHQ  1 a  A q ! Q   "#%&() "#%&()        ! #$ &' )* 	 	 	 	 	 	  !	 #$	 &'	 )*	
 
 
 
  	1 r*   rQ   N)rR   rS   rT   rU   r  r  r  r  r  r  r  r  r  r  r  rV   rW   rX   s   @r'   r  r    sA     !0!0!.!,!
!
!
!
	!!	! 	!r*   r  c                     a  ] tR tRt o Rt]P                  P                  R]! ]	P                  4       RR0,
          4      4      R 4       t]P                  P                  R]	P                  4       4      R 4       tRtV tR	# )
TestEmptyArrayi  z<Check how padding behaves on arrays with an empty dimension.r\   r
   r   c                r   R p\         P                  ! \        VR7      ;_uu_ 4        \        P                  ! . ^VR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        P                  ! \        P
                  ! ^ 4      ^VR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        P                  ! \        P                  ! R4      RVR7       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)zFcan't extend empty axis 0 using modes other than 'constant' or 'empty'r@   r_   N)ra   rM   )rt  r  )rF   rG   rH   r   rd   ndarrayr  rQ  s   && r'   r  'TestEmptyArray.test_pad_empty_dimension  s    ]]:U33FF2qt$ 4]]:U33FF2::a=!$/ 4]]:U33FF288F#\= 43	 4333333s#   C?-.D.D%?D	D"	%D6	c                    \         P                  ! \         P                  ! R4      RVR7      pVP                  R8X  g   Q hR# )r8   r_   N)r8   ra   r8   )r4  r  rt  )r  ra   r  )r   rd   rN   rc   )r"   r\   r%   s   && r'   test_pad_non_empty_dimension+TestEmptyArray.test_pad_non_empty_dimension  s0    	*,>TJ||y(((r*   rQ   N)rR   rS   rT   rU   __doc__rF   ru   rv   sortedrw   rx   r  r  rV   rW   rX   s   @r'   r  r    sr     F[[ 	z(J+@@A
>
> [[VZ__%67) 8)r*   r  c                   P   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
tV tR# )TestSymmetrici  c                   \         P                  ! ^d4      p\         P                  ! VRR4      p\         P                  ! . ^N^N^N^N^N^N^N^N^N^N^N^N^N^N^
N^	N^N^N^N^N^N^N^N^N^ N^ N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^ N^!N^"N^#N^$N^%N^&N^'N^(N^)N^*N^+N^,N^-N^.N^/N^0N^1N^2N^3N^4N^5N^6N^7N^8N^9N^:N^;N^<N^=N^>N^?N^@N^AN^BN^CN^DN^EN^FN^GN^HN^IN^JN^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cN^cN^bN^aN^`N^_N^^N^]N^\N^[N^ZN^YN^XN^WN^VN^UN^TN^SN^RN^QN^PN4      p\	        W4       R# )r|   r   Nr   r   r   s   &  r'   r  TestSymmetric.test_check_simple  s   IIcNFF1h,HH5R 5 5R 5 5R 5 5R 5 5R 5 555555!"5$%5'(5*+5-.555555 	5 	5 	5 	5 	5 	5  !	5 #$	5 &'	5 )*	5
 5
 5
 5
 5
  5
 "$5
 &(5
 *,5
 .05
 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245  !5  !5  !5  !5   !5  "$!5  &(!5  *,!5  .0!5  24!5& 	1 r*   c                   \         P                  ! ^d4      p\         P                  ! VRRRR7      p\         P                  ! . RNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRN^ N^ N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^ N^!N^"N^#N^$N^%N^&N^'N^(N^)N^*N^+N^,N^-N^.N^/N^0N^1N^2N^3N^4N^5N^6N^7N^8N^9N^:N^;N^<N^=N^>N^?N^@N^AN^BN^CN^DN^EN^FN^GN^HN^IN^JN^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cN^cN^dN^eN^fN^gN^hN^iN^jN^kN^lN^mN^nN^oN^pN^qN^rN^sN^tN^uN^vN4      p\	        W4       R# )r|   r   r  r  Nr   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rC   rB   rD   r&  r   r   s   &  r'   r  #TestSymmetric.test_check_odd_method  s   IIcNFF1h%@HH?S ?# ?s ?C ? ?c ?3 ? ?S ?# ?????!$?&(?*,?.0?24?68?????? 	? 	? 	? 	? 	? 	?  !	? #$	? &'	? )*	?
 ?
 ?
 ?
 ?
  ?
 "$?
 &(?
 *,?
 .0?
 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ?  ? "$? &(? *,? .0? 24? ? ? ? ? !$? &)? +.? 03? 58? :=?  !?  !?  !?   !?  "%!?  '*!?  ,/!?  14!?  69!?  ;>!?& 	1 r*   c                    . RO. RO.p\         P                  ! VRR4      p\         P                  ! . RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO.4      p\        W4       R# )r  r   Nr  r  r  r
  r7   r7   r
  r  r  r
  r7   r7   r
  r  r  r
  r7   r7   )r  r  r  r  r7   r7   r  r  r  r  r7   r7   r  r  r  r  r   s   &  r'   r  "TestSymmetric.test_check_large_pad  se    	"FF1fk*HH::::::::::::::<& 	1 r*   c                    . RO. RO.p\         P                  ! VRRRR7      p\         P                  ! . RO. RO. R	O. R	O. R
O. R
O. RO. RO. RO. RO. RO. RO. RO. RO.4      p\        W4       R# )r  r   r  r  Nr  r  r  )rB   rD   rD   r&  ra   ra   rn   r8   r8   rM   r  r  r
  r7   r7   )r&  ra   ra   rn   r8   r8   rM   r  r  r
  r7   r7   r  r  r  )rn   r8   r8   rM   r  r  r
  r7   r7   r  r  r  r  r6  r6  )rM   r  r  r
  r7   r7   r  r  r  r  r6  r6  r5  r7  r7  )r
  r7   r7   r  r  r  r  r6  r6  r5  r7  r7  r8  r9  r9  )r  r  r  r  r6  r6  r5  r7  r7  r8  r9  r9  r;  r:  r:  )r  r6  r6  r5  r7  r7  r8  r9  r9  r;  r:  r:  r<  r=  r=  r  r   s   &  r'   test_check_large_pad_odd&TestSymmetric.test_check_large_pad_odd  sh    	"FF1fk>HHIIIIIIIIIIIIIIK$ 	1 r*   c                    . RO.p\         P                  ! VRR4      p\         P                  ! . RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO.4      p\        W4       R# )r  r   Nr  r  r  r  r   s   &  r'   r  TestSymmetric.test_check_shape  s_    KFF1fk*HH:::::::::::::<" 	1 r*   c                    \         P                  ! . RO^R4      p\         P                  ! . RO4      p\        W4       R# )rn   r   Nr  )r8   rn   rn   r8   rM   rM   r8   r  r   s   &  r'   r  TestSymmetric.test_check_01  s+    FF9a-HH*+1 r*   c                    \         P                  ! . RO^R4      p\         P                  ! . RO4      p\        W4       R# )rn   r   Nr  )	rM   r8   rn   rn   r8   rM   rM   r8   rn   r  r   s   &  r'   r  TestSymmetric.test_check_02  s+    FF9a-HH011 r*   c                    \         P                  ! . RO^R4      p\         P                  ! . RO4      p\        W4       R# )rn   r   Nr  )rn   r8   rM   rM   r8   rn   rn   r8   rM   rM   r8   rn   rn   r8   rM   r  r   s   &  r'   r  TestSymmetric.test_check_03#  s+    FF9a-HHBC1 r*   rQ   N)rR   rS   rT   rU   r  r  r  r  r  r  r  r  rV   rW   rX   s   @r'   r  r    s2     !0!0!0!.!,!
!
! !r*   r  c                   J   a  ] tR tRt o R tR tR tR tR tR t	R t
R	tV tR
# )TestWrapi)  c                   \         P                  ! ^d4      p\         P                  ! VRR4      p\         P                  ! . ^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cN^ N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^ N^!N^"N^#N^$N^%N^&N^'N^(N^)N^*N^+N^,N^-N^.N^/N^0N^1N^2N^3N^4N^5N^6N^7N^8N^9N^:N^;N^<N^=N^>N^?N^@N^AN^BN^CN^DN^EN^FN^GN^HN^IN^JN^KN^LN^MN^NN^ON^PN^QN^RN^SN^TN^UN^VN^WN^XN^YN^ZN^[N^\N^]N^^N^_N^`N^aN^bN^cN^ N^N^N^N^N^N^N^N^N^	N^
N^N^N^N^N^N^N^N^N^N4      p\	        W4       R# )r|   r   Nr   r   r   s   &  r'   r  TestWrap.test_check_simple*  s   IIcNFF1h'HH5R 5 5R 5 5R 5 5R 5 5R 5 555555!#5%'5)+5-/513555555 	5 	5 	5 	5 	5 	5  !	5 #$	5 &'	5 )*	5
 5
 5
 5
 5
  5
 "$5
 &(5
 *,5
 .05
 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5  5 "$5 &(5 *,5 .05 245 5 5 5 5 5 5  !5 #$5 &'5 )*5  !5  !5  !5  !5   !5  "$!5  &(!5  *,!5  .0!5  24!5& 	1 r*   c                h   \         P                  ! ^4      p\         P                  ! VR4      p\         P                  ! VRR4      p\         P                  ! . RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO. RO.4      p\        W4       R# )r7  r   Nry  )r6  r7  )r6  r5  r  r  r6  r5  r  r  r6  r5  r  r  r6  r5  r  r  r6  r5  r  r  r6  r5  r  r  r6  r5  )r8   rM   ra   rn   r8   rM   ra   rn   r8   rM   ra   rn   r8   rM   ra   rn   r8   rM   ra   rn   r8   rM   ra   rn   r8   rM   )r7   r  r  r
  r7   r  r  r
  r7   r  r  r
  r7   r  r  r
  r7   r  r  r
  r7   r  r  r
  r7   r  rG  r   s   &  r'   r  TestWrap.test_check_large_padB  s    IIbMJJq&!FF1h'HH.)).)).)).)).)).)).)).)).e3/5l 	1 r*   c                    \         P                  ! . RO^R4      p\         P                  ! . RO4      p\        W4       R# )rn   r   Nr  )	rn   r8   rM   rn   r8   rM   rn   r8   rM   r  r   s   &  r'   r  TestWrap.test_check_01~  s+    FF9a(HH011 r*   c                    \         P                  ! . RO^R4      p\         P                  ! . RO4      p\        W4       R# )rn   r   Nr  )rM   rn   r8   rM   rn   r8   rM   rn   r8   rM   rn   r  r   s   &  r'   r  TestWrap.test_check_02  s+    FF9a(HH671 r*   c                    \         P                  ! R4      p\         P                  ! VRRR7      p\        WRR1RR13,          4       R# )rM   r   r_   Nr  )ra   r
  r  )r   rN   rd   r   r   s   &  r'   test_pad_with_zeroTestWrap.test_pad_with_zero  s9    GGFOFF1f6*1SbSk*r*   c                b   \         P                  ! ^4      p\         P                  ! VRRR7      p\        \         P                  WW3,          R,          V4       \         P                  ! ^4      p\         P                  ! VRRR7      p\        \         P                  WW3,          RR V4       R# )za
Check wrapping on each side individually if the wrapped area is longer
than the original array.
r   r_   :rM   NNN)r7  ra   )ra   r7  rB   )r   r9   rd   r   r_r   s   &  r'   test_repeated_wrappingTestWrap.test_repeated_wrapping  s|    
 IIaLFF1gF+255q,R0!4IIaLFF1gF+255q,Sb115r*   c           	         \         P                  ! ^4      P                  ^^4      p\         P                  ! VRR.RR7      p\         P                  ! . RO. RO. RO. RO. RO. RO.4      p\        W4       R# )zv
Assert that 'wrap' pads only with multiples of the original area if
the pad width is larger than the original array.
r   r_   Nrx  rM   rn   )rM   r8   rM   r8   rM   r8   )rn   ra   rn   ra   rn   ra   rG  r   s   &  r'   &test_repeated_wrapping_multiple_origin/TestWrap.test_repeated_wrapping_multiple_origin  sd    
 IIaL  A&FF1vv&V4HH!
 	1 r*   rQ   N)rR   rS   rT   rU   r  r  r  r  r  r  r#  rV   rW   rX   s   @r'   r  r  )  s.     !0:!x!
!
+
6! !r*   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )TestEdgei  c                   \         P                  ! ^4      p\         P                  ! VR4      p\         P                  ! VRR4      p\         P                  ! . RO. RO. RO. RO. RO. RO. RO. RO. RO.	4      p\        W4       R# 	r7  r   Nr  rM   r2  )ra   ra   ra   ra   rn   r8   r8   r8   )rM   rM   rM   rM   r  r
  r
  r
  )r7   r7   r7   r7   r  r  r  r  )r  r  r  r  r6  r5  r5  r5  rG  r   s   &  r'   r  TestEdge.test_check_simple  sj    IIbMJJq&!FF1&/HH%%%%%))))
+ 	1 r*   c                   \         P                  ! . RO4      p\         P                  ! VRR4      p\         P                  ! . RO4      p\        W#4       \         P                  ! . RO. RO.4      p\         P                  ! VRR4      p\         P                  ! VRR4      p\        W#4       \         P                  ! ^4      P                  ^^^4      p\         P                  ! VRR4      p\         P                  ! VRR4      p\        W#4       R# )	rn   r   Nr  )rK  )rn   rn   r8   rM   rM   rM   r  ri  )rK  rK  rK  )r   r   rd   r   r9   r:   )r"   r,   paddedr#   s   &   r'   test_check_width_shape_1_2#TestEdge.test_check_width_shape_1_2  s     HHY9f-88./6,HHi+,9f-66!-v66,IIbM!!!Q*9f-66!5v>6,r*   rQ   N)rR   rS   rT   rU   r  r-  rV   rW   rX   s   @r'   r&  r&    s     !&- -r*   r&  c                   ,   a  ] tR tRt o R tR tRtV tR# )	TestEmptyi  c                    \         P                  ! ^4      P                  ^^4      p\         P                  ! VRR.RR7      pVP                  R8X  g   Q h\        W^R1^R13,          4       R# )	rB  r   r_   NrL   r"  )r  r6  rB   r&  r   r9   r:   rd   rc   r   r  s   &  r'   test_simpleTestEmpty.test_simple  s^    iim##Aq)ff-G<||w&&&S2qt,-r*   c                    \         P                  ! R4      p\         P                  ! V. RORR7      pVP                  R8X  g   Q hR# )rM   r   r_   Nr  r  r  r  r  s   &  r'   r  "TestEmpty.test_pad_empty_dimension  s5    hhy!/g>||y(((r*   rQ   N)rR   rS   rT   rU   r3  r  rV   rW   rX   s   @r'   r0  r0    s     .) )r*   r0  c            	          R  p \         P                  ! ^4      P                  ^^4      p\         P                  ! V^V 4      p\         P                  ! . RO. RO. RO. RO. RO. RO.4      p\        W4       R# )c                 6    ^
V RV^ ,          % ^
W^,          ) R% R# )r6  NrQ   )vectorr  iaxiskwargss   &&&&r'   _padwithtens6test_legacy_vector_functionality.<locals>._padwithtens  s"     "}	!!#!}~r*   N)r6  r6  r6  r6  r6  r6  r6  )r6  r6  ra   rn   r8   r6  r6  )r6  r6  rM   r  r
  r6  r6  rG  )r<  r,   r   s      r'    test_legacy_vector_functionalityr>    sd    $ 			!Q"A
q!\"A
	%	%	%	%	%	%	'		
A qr*   c                      \         P                  ! ^.^RR7      p \         P                  ! . RO4      p\        W4       R# )rn   r
   r_   N)ra   ra   rn   ra   ra   r  )r,   r   s     r'   test_unicode_moder@    s,    
sAJ'A
!Aqr*   r\   c                     \         P                  ! RRR7      pRp\         P                  ! RRR7      p\        \         P                  ! WV R7      V4       R# )r  N)
fill_valuer_   r)  r2  )r  r  )r   r}  r   rd   )r\   r,   rh   r   s   &   r'   test_object_inputrC    s>     	4(AG
4(Arvvat4a8r*   c                   >  a  ] tR tRt o ]P
                  P                  R. RO4      ]P
                  P                  R]P                  4       4      R 4       4       t	]P
                  P                  R]P                  4       4      R 4       t
]P
                  P                  R. RO4      ]P
                  P                  R]P                  4       4      R 4       4       t]P
                  P                  RRRR]! 4       R3RR]3]! ^R4      R3R.4      ]P
                  P                  R]P                  4       4      R	 4       4       tR
 t]P
                  P                  R. RO4      ]P
                  P                  R]P                  4       4      R 4       4       tRtV tR# )TestPadWidthi  r  r\   c                   \         P                  ! ^4      P                  R4      pRp\        P                  ! \
        VR7      ;_uu_ 4        \         P                  ! W1V4       RRR4       R#   + '       g   i     R# ; i)rr   z(operands could not be broadcast togetherr@   Nr,  r-  r"   r  r\   r.  rA   s   &&&  r'   test_misshaped_pad_width%TestPadWidth.test_misshaped_pad_width  sO     iim##F+:]]:U33FF34( 4333   A..A?	c                   \         P                  ! ^4      P                  R4      pRp\        P                  ! \
        VR7      ;_uu_ 4        \         P                  ! VRV4       RRR4       R#   + '       g   i     R# ; i)rr   zDinput operand has more dimensions than allowed by the axis remappingr@   Nr,  ))r4  )r  )r
  )r  rt  rV  r-  )r"   r\   r.  rA   s   &&  r'   test_misshaped_pad_width_2'TestPadWidth.test_misshaped_pad_width_2  sR    iim##F+]]:U33FF3@$G 4333s   A//B 	c                   \         P                  ! ^4      P                  R4      pRp\        P                  ! \
        VR7      ;_uu_ 4        \         P                  ! W1V4       RRR4       R#   + '       g   i     R# ; i)rr   r+  r@   Nr,  r-  rG  s   &&&  r'   test_negative_pad_width$TestPadWidth.test_negative_pad_width  sO     iim##F+5]]:U33FF34( 4333rJ  zpad_width, dtypeNc           
        \         P                  ! ^4      P                  R4      pRpVe]   \        P                  ! \
        VR7      ;_uu_ 4        \         P                  ! V\         P                  ! WR7      V4       RRR4       R# \        P                  ! \
        VR7      ;_uu_ 4        \         P                  ! WAV4       RRR4       \        P                  ! \
        VR7      ;_uu_ 4        \         P                  ! V\         P                  ! V4      V4       RRR4       R#   + '       g   i     R# ; i  + '       g   i     L; i  + '       g   i     R# ; i)rr   z%`pad_width` must be of integral type.Nr@   r>   r,  )r   r9   r:   rF   rG   	TypeErrorrd   r   )r"   r  r?   r\   r.  rA   s   &&&&  r'   test_bad_typeTestPadWidth.test_bad_type"  s     iim##F+7y66sBHHY<dC 76 y66st, 7y66sBHHY/6 76 766 76666s$   .D',D;0-E'D8	;E	E	c                0   \         P                  ! ^4      p\         P                  ! VR4      p\         P                  ! V\         P                  ! R4      R4      p\         P                  ! . RO. RO. RO. RO. RO. RO. RO. RO. RO.	4      p\        W4       R# r(  rG  r   s   &  r'   test_pad_width_as_ndarray&TestPadWidth.test_pad_width_as_ndarray:  ss    IIbMJJq&!FF1bhh/0&9HH000000000
2 	1 r*   c           	         \         P                  ! ^4      P                  ^^4      p\        V\         P                  ! W1VR7      4       R# )rr   r_   N)r   r9   r:   r   rd   )r"   r  r\   r.  s   &&& r'   test_zero_pad_width TestPadWidth.test_zero_pad_widthM  s3     iim##Aq)3sD ABr*   rQ   ))r  r
  r7   r  )rt  rV  r4  )rK  ry  )r
  r7   )rM   r  r
  )ra   rn   r8   r&  rT  )3N)wordNr2   )g333333@N))r8   rM   r  r3  )))g rM   r3  N)ra   r`   )r`   r`   )rR   rS   rT   rU   rF   ru   rv   rw   rx   rH  rL  rO  r    r	   rS  rV  rY  rV   rW   rX   s   @r'   rE  rE    s    [[[ +  [[VZ__%67) 8) [[VZ__%67H 8H [[KM[[VZ__%67) 8M) [[/	4	f%	B#	2 	 [[VZ__%677 8	7!& [[[*GH[[VZ__%67C 8 ICr*   rE  c           	        \         V ,          p/ p\         P                  4        F  pW18w  g   K  VP                  V4       K  	  \        P                  ! . RO^V 3/ VB  VP                  4        FT  w  rERV  R2p\        P                  ! \        VR7      ;_uu_ 4        \        P                  ! . RO^V 3/ WE/B  RRR4       KV  	  R#   + '       g   i     Kk  ; i)z1Test behavior of pad's kwargs for the given mode.z(unsupported keyword arguments for mode ''r@   Nr  )	rw   valuesupdater   rd   itemsrF   rG   rH   )r\   allowednot_allowedr;  keyvaluerA   s   &      r'   test_kwargsrg  T  s     GK##%v& & FF9a))!'')
:4&B]]:U33FF9a6#6 43 *333s   C		Cc                  |    \         P                  ! ^^.4      p \        \         P                  ! V ^4      . RO4       R# )rn   N)ra   ra   rn   rn   ra   ra   )r   r   r   rd   )r.  s    r'   test_constant_zero_defaultri  e  s)    
((Aq6
Crvvc1~'9:r*   constTFc                     R V  R2p\         P                  ! \        VR7      ;_uu_ 4        \        P                  ! . RO^V R7       RRR4       R#   + '       g   i     R# ; i)zmode 'z' is not supportedr@   r_   Nr  rP  )r\   rA   s   & r'   test_unsupported_moderl  j  sA    TF,-E	z	/	/
y!$' 
0	/	/	/s   AA"	c                     \         P                  ! ^4      P                  ^^4      R,          p\         P                  ! VRV 4      pVP                  R8X  g   Q h\        V^R1^R13,          V4       R# )rB  N)NNr8   rn  rL   )r  r  rB   r2  )r\   r.  r%   s   &  r'   test_non_contiguous_arrayro  q  s`    
))B-

1
%h
/CVVC&F<<6!!!"ad
#S)r*   c                *   \         P                  ! RRR7      p\         P                  ! V^V 4      P                  R,          '       g   Q h\         P                  ! RRR7      p\         P                  ! V^V 4      P                  R,          '       g   Q hR# )z5Test if C and F order is preserved for all pad modes.C)orderC_CONTIGUOUSFF_CONTIGUOUSN)r
  r6  )r   rN   rd   flags)r\   r$   s   & r'   test_memory_layout_persistencerw  y  sl     	s#A66!Q##N3333
s#A66!Q##N3333r*   r?   c                     \         P                  ! RV R7      p\         P                  ! V^VR7      pVP                  V 8X  g   Q hR# )rM   r>   r_   N)rM   r8   rn   )r   r  rd   r?   )r?   r\   r.  r%   s   &&  r'   test_dtype_persistencery    s8     ((9E
*CVVC&F<<5   r*   z&input_shape, pad_width, expected_shapec                     \         P                  ! V 4      p\         P                  ! W14      pVP                  V8X  g   Q hR # )Nr  )input_shaper  expected_shaper,   r%   s   &&&  r'   test_pad_dict_pad_widthr}    s2     	AVVA!F<<>)))r*   )r   r   r   r   r[  rD   rx  )rM   r  r
  rU  )r6  r  r
  r&  ry  )r6  r  r7  )rM   r9  r
  )(r  rF   numpyr   numpy.lib._arraypad_implr   numpy.testingr   r   r   _coresctypesr  rw   r   r[   rz   rY  r  r  r  r  r  r&  r0  r>  r@  ru   rv   rC  rE  rx   rg  ri  r    rl  ro  rw  ry  r}  rQ   r*   r'   <module>r     s     . K K HHVhhuhhw  	hhy!"  "A&
BL!$t$
]D!}d#t$'.&)
BR
P* P*fM M,f: f:Rp) p)fR' R'jO! O!d) )0C! C!L@! @!F$- $-N
) 
)( !IJ9 K9NC NCb !237 47 ;
 !WfhdE!JK( L( !23* 4* !234 44 /2!23! 4 3! AV/0F./FB')BCA)*	D **r*   