+
    ei[  c                   s   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&R# )?z(Tests for the array padding functions.

N)	_as_pairs)assert_allcloseassert_array_equalassert_equalZuintZintfloatcomplexconstantconstant_valuesedgelinear_ramp
end_valuesmaximumstat_lengthmeanmedianminimumreflectreflect_typeZeven	symmetricwrapemptyc                   sD   a  ] tR t^t o R tR tR tR tR tR t	Rt
V tR# )	TestAsPairsc                s   \         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resultZobj   &    D/usr/lib64/python3.14/site-packages/numpy/lib/tests/test_arraypad.pytest_single_valueZTestAsPairs.test_single_value    st    88aVHrM*aSA3%Aq"%F* ! hc2HHsj\B&'	
    c                s   \         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   r   r    test_two_valuesZTestAsPairs.test_two_values-   s     88aVHrM*a&Aq6(#Aq"%F* $ hsCj"%HHsCj\B&'	
 	sQCj!$HHq!fq!f%&	

 	usena(HHsCj3*-.	
r"   c                sj    Rp\        \        R ^RR7      V4       \        \        R ^RR7      V4       R # )NFZas_indexT)NNr&   r&   )r   r    r   r      & r    test_with_noneZTestAsPairs.test_with_noneF   s7    =dA.	
 	dA-	
r"   c                s|    \         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    r'   r(   r    test_pass_throughZTestAsPairs.test_pass_throughQ   s/    99R=((0h"	
r"   c           
     s(   \        \        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
@Tr%   dtypeg(\@znegative valuesmatchN)r   r    r   r   Zintppytestraises
ValueError)r   r   r(   r    test_as_indexZ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                s
   \         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 allowedr1   Nzcould not be broadcastr+      )r6   r7   r8   r    r   ones)r   s   &r    test_exceptionsZ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$   r)   r.   r9   r=   __static_attributes____classdictcell__Z__classdict__   @r    r   r      s(     

2	

0* *r"   r   c                   s  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           	     s    \         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   rH   N    rL   r   r,   r-   shaper   padr   rH   testZ_pad_amt   &&   r    test_zero_padding_shortcutsZ4TestConditionalShortcuts.test_zero_padding_shortcutss   sP    yy~%%aA.#'::.:a6:.4D!AB /s   A'c           
     s   \         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 )rI   r   rJ   rH   r   N   rW   rM   rP   rS   r    test_shallow_statistic_rangeZ5TestConditionalShortcuts.test_shallow_statistic_rangey   sa    yy~%%aA.#'::.:a6:.266$f=66$dJ	L /s   A>c           
     s   \         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 )   rJ   rU   N)r;   r;   rM   rP   rS   r    test_clip_statistic_rangeZ2TestConditionalShortcuts.test_clip_statistic_range   s_    yy}$$Q*#'::.:a6:.266$d;66$dK	M /s   A=r>   N)r   r   r   r   )r?   r@   rA   rB   r6   markparametrize
_all_modeskeysrT   rX   rZ   rC   rD   rE   rF   r    rG   rG   r   s     [[VZ__%67C 8C
 [[V%NOL PL [[V%NOM PMr"   rG   c                   sN  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                s
   \         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)      )r:   r   r,   astyperO   r   r   r   r#   b   &  r    test_check_mean_stat_lengthZ)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                s   \         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   r,   rO   r   r   r   r   r    test_check_maximum_1Z"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                s   \         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   r   r    test_check_maximum_2Z"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                s   \         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   rb   Nr   r   r   r   r    test_check_maximum_stat_lengthZ,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   r   r    test_check_minimum_1Z"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                s   \         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   r   r    test_check_minimum_2Z"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                s   \         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   rb   Nr   r   r   r   r    test_check_minimum_stat_lengthZ,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`   ra   r        H@rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   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   r   r    test_check_medianZ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                s    \         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# )
r;   r   Nr;   rW      r      	   r      r+   )r   r   r   r   r   r;   r;   rW   r   r;   r   r   r   r   r   r   r   r   r+   r   )r   r   rO   r   r   r   r    test_check_median_01Z"TestStatistic.test_check_median_01I  sU    HHiI67FF1a"HH 	1 r"   c                s    \         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# )
r;   r   Nr   r   r   )r   r   r   r   r   r   r   r   )r   r   rO   ZTr   r   r   r    test_check_median_02Z"TestStatistic.test_check_median_02W  s_    HHiI67FF1338$&&HH 	1 r"   c                s   \         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`   ra   rf   r   r   rb   rd   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   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   r   r   r   r    test_check_median_stat_lengthZ+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                s    . 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   rb   Nr   r   r*   r      )r   r   r   r   r   r   r   r*   r*   r*   r*   r*   r*   r*   r*   r   rO   r   r   r   r   r    test_check_mean_shape_oneZ'TestStatistic.test_check_mean_shape_one  sa    KFF1ff!4HH:::::::::::::<" 	1 r"   c                r   )jr`   ra   r   r   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   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   r   r    test_check_mean_2Z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"   rH   r   r   r   r   c                s    \         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   r+   r   )rL   g-q=rL   rV   )r   r   float64rO   r   )r   rH   r#      && r    test_same_prepend_appendZ&TestStatistic.test_same_prepend_append  sJ     HH[!BHH]"**$MMFF1fd#QqT1R5!r"   r   c           	     s   \         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)rY   #index can't contain negative valuesr1   rb   Nr*   r   r   r,   r-   r6   r7   r8   rO   )r   rH   r   arrr2      &&&  r    test_check_negative_stat_lengthZ-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                s   \         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# )rY   r   rU   Nr   r:   r;   r+   r;   )
r*   r*   r*   r   r*   r   r   r   r   r   )
rW   rW   rW   rL   rW   r+   r;   r   r;   r;   )
   r   r   
   r            r  r  )
   r  r     r           r  r  )
   r	  r	  r   r	           r  r  )
   r  r  r   r           r  r  r   r,   r-   rO   r   r   r   r   r    test_simple_stat_lengthZ%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                s    \         P                  ! R R.RV^ R7      p\         P                  ! \         P                  R R\         P                  \         P                  .4      p\	        W#4       R# )re   rf   rb   NrW   r+   )r   rO   r   Znanr   )r   rH   r   r      &&  r    test_zero_stat_length_validZ)TestStatistic.test_zero_stat_length_valid  sI     ffb"Xvt;88RVVRRVVRVV<=S#r"   c           	     s   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 paddingr1   re   rf   rb   N)rW   rL   r6   r7   r8   r   rO   r   rH   r2   r   r    test_zero_stat_length_invalidZ+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	r>   N)r   r   r   r   r5   )r5   )r;   r   ))r   r+   )r5   r;   ))r4   r+   )r?   r@   rA   rB   r   r   r   r   r   r   r   r   r   r   r   r   r   r6   r[   r\   r   r   r  Zfilterwarningsr  r  rC   rD   rE   rF   r    r_   r_      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"   r_   c                   s\   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                s   \         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   )r   r   r   r   r   r    test_check_constantZ 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                r   )r`   r   Nr   r   r   r   r    test_check_constant_zerosZ&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                s    \         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# )rY   r   皙?rH   r   Nr  )	rW   rW   rW   rW   rW   rW   rW   rW   rW   )	rW   rL   rW   r+   r;   r   r   rW   rW   )	rW   r*   r   r   r   r   r   rW   rW   )	rW   r  r  r  r  r  r  rW   rW   )	rW   r  r  r   r	  r
  r  rW   rW   )	rW   r  r   r  r  r  r  rW   rW   r   r,   r-   rO   r   r   r   r   rQ   r      &   r    test_check_constant_floatZ&TestConstant.test_check_constant_float"  sj     iim##Aq)vvc6
#&(8800000000	2 	'r"   c                s6   \         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# )rY   r   r  r   Nr  r  )	r  r  r  r  r  r  r  r  r  )	r  rd   re   rf   rg   rh   ri   r  r  )	r  rj   rk   rl   rm   rn   ro   r  r  )	r  rp   rq   rr   rs   rt   ru   r  r  )	r  rv   rw   rx   ry   rz   r{   r  r  )	r  r|   r}   r~   r   r   r   r  r  r   r,   r-   r   r   rO   r   r   )r   r   Z	arr_floatrQ   r   r   r    test_check_constant_float2Z'TestConstant.test_check_constant_float26  s~     iim##Aq)JJrzz*	vvi!1
#&(88JJJJJJJJ	L 	'r"   c                s   \         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)r(  r)  )r   r,   r   rO   r   r   r   r   r    test_check_constant_float3Z'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           
     s    \         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# )rY   r   r   N)rW   r  )
r;   r;   r;   r;   r;   r;   r;   r;   r;   r;   )
r;   r;   rL   rW   r+   r;   r   r   r;   r;   )
r;   r;   r*   r   r   r   r   r   r;   r;   )
r;   r;   r  r  r  r  r  r  r;   r;   )
r;   r;   r  r  r   r	  r
  r  r;   r;   )
r;   r;   r  r   r  r  r  r  r;   r;   r!  r"  r#  r    "test_check_constant_odd_pad_amountZ/TestConstant.test_check_constant_odd_pad_amountc  se    iim##Aq)vvc<j#$&8844444446
 	'r"   c                s    \         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   r   N)r  rW   r;   )r  r;   r   )r;   rW   rW   r   r   r   )r;   rL   rW   r   r   r   )r;   r+   r;   r   r   r   )r;   r+   r+   r   r   r   r!  r"  r#  r    test_check_constant_pad_2dZ'TestConstant.test_check_constant_pad_2dt  s`    iil""1a(vvc+**:<88	!
 	'r"   c                s   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# )r+   r/   r   r   Nl    l    )r   fullZuint64rO   Zminr   Zint64)r   Z
uint64_maxr   rQ   r   Z	int64_max   &     r    test_check_large_integersZ&TestConstant.test_check_large_integers  s     
gga2995vvc1:swwyI771j		:4*	gga"((3vvc1:swwyI771irxx84*r"   c                s   \         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# )rW   r/   r   )	pad_widthrH   r   Nr   )r   r   r   rO   r   )r   r   Zobj_aZobj_bZobj_cr   r1  r    test_check_object_arrayZ$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# )r;   r   rJ   Nr;   rL   r+   rL   r  r+  r;   r   r   r   zerosrO   rN   r   r   r   r   r    test_pad_empty_dimensionZ%TestConstant.test_pad_empty_dimension  s5    hhy!/jA||y(((r"   r>   N)r?   r@   rA   rB   r  r  r$  r'  r*  r,  r/  r2  r4  r=  rC   rD   rE   rF   r    r  r    s<     !0!0(((*0("(+* ) )r"   r  c                   s   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                s   \         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`   ra   r	   )r
   rh   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?rd   re   rf   rg   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   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㈵>)ZrtolZatolNr   )r   r   )r   r,   r   rO   r   r   r   r   r    test_check_simpleZ 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                s2   \         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	   rH   r
   N)r+   r+   rK   )	rd   rd   rd   rd   rd   rd   rd   rd   rd   )	rd   rd   rd   rc   re   g      ?rf   re   rd   )	rd   rd   rd   re   rf   rg   rh   rf   rd   )	rd   g      @ri   rj   rk   rl   rm   g      @rd   )	rd   ri   rn   ro   rp   rq   rr   rk   rd   )	rd         @rs   rt   ru   rv   rw         #@rd   )	rd   g      @rA  rl   g      !@rm   rB  g      @rd   r&  r"  r#  r    test_check_2dZTestLinearRamp.test_check_2d  sv    iim##Aq)00<vvc6&I88BBBBBBBBDE 	'r"   )Z
exceptionsc                sD   ^ 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# )
rL   )Fractionr	   r@  Nr   r:   r4   r5   )Z	fractionsrD  r   r   rO   r   )r   rD  r   Zactualr   r   r    test_object_arrayZ TestLinearRamp.test_object_array  s    &hhAQ89V-AF 88aaaRRRR
  	V&r"   c                s   \         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	   rJ   rd   N)i   i{   )NNNrL   )rG  r   )rL   rG  )r   rG  )r   rO   r<   r-   r   )r   r#   r(   r    test_end_valuesZTestLinearRamp.test_end_values  sa    FF2772;&&q!,j}MQtWb!QuXr"QtWb!QuXr"r"   r0   c                sf   \         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)rL   rW   r+   r;   r+   rW   rL   )r;   r+   rW   rL   rW   r+   r;   )r   r   rO   r   )r   r0   r   r   r   rS   r    test_negative_differenceZ'TestLinearRamp.test_negative_difference  s     HHaS&1=Q?881?V&HHaS&1=Q?881?V&r"   r>   N)r?   r@   rA   rB   r?  rC  r6   r[   ZxfailZAssertionErrorrF  rH  r\   _numeric_dtypesrI  rC   rD   rE   rF   r    r>  r>    sb     40( [[>"34' 5'$# [[Wo6' 7'r"   r>  c                   sb   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                s   \         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   r   r    r?  Z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                s   \         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   irE  r4   r3   r5   r   r   r   r   r    test_check_odd_methodZ!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                s    . 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   r   )r   r*   r   r   r   r*   r   r   r   r*   r   r   r   r*   r   r   r   r   r*   r   r   r   r*   r   r   r   r*   r   r   r   r   r   r   r    test_check_large_padZ 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   rc  r   r   r   r    test_check_shapeZ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# )rW   r   NrW   r+   r;   )r;   r+   rW   r+   r;   r+   rW   r   r   r   r    test_check_01ZTestReflect.test_check_01W  s+    FF9a+HH*+1 r"   c                    \         P                  ! . RO^R4      p\         P                  ! . RO4      p\        W4       R# )rW   r   Nrh  )	r+   r;   r+   rW   r+   r;   r+   rW   r+   r   r   r   r    test_check_02Z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# )rW   r   Nrh  )rW   r+   r;   r+   rW   r+   r;   r+   rW   r+   r;   r   r   r   r    test_check_03ZTestReflect.test_check_03a  s+    FF9a+HH671 r"   c                s    \         P                  ! . RO^^
.R4      p\         P                  ! . RO4      p\        W4       R# )rW   r   Nrh  )r+   rW   r+   r;   r+   rW   r+   r;   r+   rW   r+   r;   r+   rW   r   r   r   r    test_check_04ZTestReflect.test_check_04f  s/    FF9q"gy1HH?@1 r"   c                sl   \         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# )rW   r   NrW   r+   r;   r   r   r   r   r    test_check_05ZTestReflect.test_check_05k  s=   FF<"b95HH(Q ( (1 (a ( (A (q (! (Q ( ((((((( ("#(%&(()((((((( ("#(%&(()( ( ( ( ( ( (  !( #$( &'( )*( 	( 	( 	( 	( 	( 	(  !	( #$	( &'	( )*	(
 (
 (
 (
 (
 (
 (
  !(
 #$(
 &'() 	1 r"   c                s    \         P                  ! . RO^^.R4      p\         P                  ! . RO4      p\        W4       R# )rW   r   Nro  )r+   r;   r   r   r;   r+   rW   rW   r+   r;   r   r   r;   r+   rW   rW   r+   r;   r   r   r;   r   r   r   r    test_check_06ZTestReflect.test_check_06v  s5    FF<"a+6HH

 	1 r"   c                sX   \         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# )rW   r   N)rW   r+   r;   r   r   r*   r   r   r   r    test_check_07ZTestReflect.test_check_07  s   FF%Aw<HHQ  1 a  A q ! Q   "#%&() "#%&()        ! #$ &' )* 	 	 	 	 	 	  !	 #$	 &'	 )*	
 
 
 
  	1 r"   r>   N)r?   r@   rA   rB   r?  ra  rd  rf  ri  rk  rm  rn  rp  rq  rr  rC   rD   rE   rF   r    rK  rK    sA     !0!0!.!,!
!
!
!
	!!	! 	!r"   rK  c                   s  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.rH   r   r   c                sr   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'r1   rJ   N)rL   r;   )r+  r8  )r6   r7   r8   r   rO   Zndarrayr;  r  r   r    r=  Z'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                s    \         P                  ! \         P                  ! R4      RVR7      pVP                  R8X  g   Q hR# )r+   rJ   N)r+   rL   r+   )r   r8  r+  )r   rL   r   )r   rO   r<   rN   )r   rH   r   r   r    test_pad_non_empty_dimensionZ+TestEmptyArray.test_pad_non_empty_dimension  s0    	*,>TJ||y(((r"   r>   N)r?   r@   rA   rB   __doc__r6   r[   r\   Zsortedr]   r^   r=  rt  rC   rD   rE   rF   r    rs  rs    sr     F[[ 	z(J+@@A
>
> [[VZ__%67) 8)r"   rs  c                   sP   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                s   \         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   r   r    r?  Z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                s   \         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   rL  rM  Nr   rN  rO  rP  rQ  rR  rS  rT  rU  rV  rW  rX  rY  rZ  r[  r\  r]  r^  r_  rE  r`  r4   r3   r5   r   r   r   r   r    ra  Z#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                s    . 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   rb  r   r   r*   r*   r   r   r   r   r*   r*   r   r   r   r   r*   r*   )r   r   r   r   r*   r*   r   r   r   r   r*   r*   r   r   r   r   r   r   r    rd  Z"TestSymmetric.test_check_large_pad  se    	"FF1fk*HH::::::::::::::<& 	1 r"   c                s    . 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   rL  rM  Nr   rb  r   )r3   r5   r5   r   rL   rL   rW   r+   r+   r;   r   r   r   r*   r*   )r   rL   rL   rW   r+   r+   r;   r   r   r   r*   r*   r   r   r   )rW   r+   r+   r;   r   r   r   r*   r*   r   r   r   r   r   r   )r;   r   r   r   r*   r*   r   r   r   r   r   r   r   r  r  )r   r*   r*   r   r   r   r   r   r   r   r  r  r  r  r  )r   r   r   r   r   r   r   r  r  r  r  r  r  r  r  )r   r   r   r   r  r  r  r  r  r  r  r  r  r  r  r   r   r   r    test_check_large_pad_oddZ&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                re  )r   r   Nr   r   rw  r   r   r   r    rf  ZTestSymmetric.test_check_shape  s_    KFF1fk*HH:::::::::::::<" 	1 r"   c                rg  )rW   r   Nrh  )r+   rW   rW   r+   r;   r;   r+   r   r   r   r    ri  ZTestSymmetric.test_check_01  s+    FF9a-HH*+1 r"   c                rj  )rW   r   Nrh  )	r;   r+   rW   rW   r+   r;   r;   r+   rW   r   r   r   r    rk  ZTestSymmetric.test_check_02  s+    FF9a-HH011 r"   c                s    \         P                  ! . RO^R4      p\         P                  ! . RO4      p\        W4       R# )rW   r   Nrh  )rW   r+   r;   r;   r+   rW   rW   r+   r;   r;   r+   rW   rW   r+   r;   r   r   r   r    rm  ZTestSymmetric.test_check_03#  s+    FF9a-HHBC1 r"   r>   N)r?   r@   rA   rB   r?  ra  rd  rx  rf  ri  rk  rm  rC   rD   rE   rF   r    rv  rv    s2     !0!0!0!.!,!
!
! !r"   rv  c                   sJ   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                s   \         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   r   r    r?  Z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                sh   \         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# )r  r   Nr.  )r   r  )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r+   r;   rL   rW   r+   r;   rL   rW   r+   r;   rL   rW   r+   r;   rL   rW   r+   r;   rL   rW   r+   r;   rL   rW   r+   r;   )r*   r   r   r   r*   r   r   r   r*   r   r   r   r*   r   r   r   r*   r   r   r   r*   r   r   r   r*   r   r  r   r   r    rd  ZTestWrap.test_check_large_padB  s    IIbMJJq&!FF1h'HH.)).)).)).)).)).)).)).)).e3/5l 	1 r"   c                rj  )rW   r   Nrh  )	rW   r+   r;   rW   r+   r;   rW   r+   r;   r   r   r   r    ri  ZTestWrap.test_check_01~  s+    FF9a(HH011 r"   c                rl  )rW   r   Nrh  )r;   rW   r+   r;   rW   r+   r;   rW   r+   r;   rW   r   r   r   r    rk  ZTestWrap.test_check_02  s+    FF9a(HH671 r"   c                s    \         P                  ! R4      p\         P                  ! VRRR7      p\        WRR1RR13,          4       R# )r;   r   rJ   Nr   )rL   r   r`  )r   r<   rO   r   r   r   r    test_pad_with_zeroZTestWrap.test_pad_with_zero  s9    GGFOFF1f6*1SbSk*r"   c                sb   \         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   rJ   :r;   NNN)r  rL   )rL   r  r3   )r   r,   rO   r   Zr_r   r   r    test_repeated_wrappingZTestWrap.test_repeated_wrapping  s|    
 IIaLFF1gF+255q,R0!4IIaLFF1gF+255q,Sb115r"   c           	     s    \         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   rJ   Nr-  r;   rW   )r;   r+   r;   r+   r;   r+   )rW   rL   rW   rL   rW   rL   r  r   r   r    &test_repeated_wrapping_multiple_originZ/TestWrap.test_repeated_wrapping_multiple_origin  sd    
 IIaL  A&FF1vv&V4HH!
 	1 r"   r>   N)r?   r@   rA   rB   r?  rd  ri  rk  rz  r{  r}  rC   rD   rE   rF   r    ry  ry  )  s.     !0:!x!
!
+
6! !r"   ry  c                   ,   a  ] tR tRt o R tR tRtV tR# )TestEdgei  c                s   \         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# 	r  r   Nr   r;   r   )rL   rL   rL   rL   rW   r+   r+   r+   )r;   r;   r;   r;   r   r   r   r   )r*   r*   r*   r*   r   r   r   r   )r   r   r   r   r   r   r   r   r  r   r   r    r?  ZTestEdge.test_check_simple  sj    IIbMJJq&!FF1&/HH%%%%%))))
+ 	1 r"   c                s   \         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# )	rW   r   Nrh  )r  )rW   rW   r+   r;   r;   r;   r   r%  )r  r  r  )r   r   rO   r   r,   r-   )r   r#   Zpaddedr   r#  r    test_check_width_shape_1_2Z#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"   r>   N)r?   r@   rA   rB   r?  r  rC   rD   rE   rF   r    r  r    s     !&- -r"   r  c                   r~  )	TestEmptyi  c                s    \         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# )	r  r   rJ   Nr:   r|  )r   r   r3   r   r   r,   r-   rO   rN   r   r<  r   r    test_simpleZTestEmpty.test_simple  s^    iim##Aq)ff-G<||w&&&S2qt,-r"   c                r5  )r;   r   rJ   Nr6  r7  r9  r:  r<  r   r    r=  Z"TestEmpty.test_pad_empty_dimension  s5    hhy!/g>||y(((r"   r>   N)r?   r@   rA   rB   r  r=  rC   rD   rE   rF   r    r  r    s     .) )r"   r  c            	      s    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                 s6    ^
V RV^ ,          % ^
W^,          ) R% R# )r   Nr>   )Zvectorr3  Ziaxiskwargss   &&&&r    _padwithtensZ6test_legacy_vector_functionality.<locals>._padwithtens  s"     "}	!!#!}~r"   N)r   r   r   r   r   r   r   )r   r   rL   rW   r+   r   r   )r   r   r;   r   r   r   r   r  )r  r#   r   s      r     test_legacy_vector_functionalityr    sd    $ 			!Q"A
q!\"A
	%	%	%	%	%	%	'		
A qr"   c                  s    \         P                  ! ^.^RR7      p \         P                  ! . RO4      p\        W4       R# )rW   r   rJ   N)rL   rL   rW   rL   rL   r   )r#   r   s     r    test_unicode_moder    s,    
sAJ'A
!Aqr"   rH   c                 s    \         P                  ! RRR7      pRp\         P                  ! RRR7      p\        \         P                  ! WV R7      V4       R# )r   N)Z
fill_valuerJ   r  r   )r   r   )r   r0  r   rO   )rH   r#   rR   r   r#  r    test_object_inputr    s>     	4(AG
4(Arvvat4a8r"   c                   s>  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  r3  rH   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)rY   z(operands could not be broadcast togetherr1   Nr   r   r   r3  rH   r   r2   r   r    test_misshaped_pad_widthZ%TestPadWidth.test_misshaped_pad_width  sO     iim##F+:]]:U33FF34( 4333   A..A?	c                s   \         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)rY   zDinput operand has more dimensions than allowed by the axis remappingr1   Nr   ))r   )r   )r   )r8  r+  r  r   )r   rH   r   r2   r  r    test_misshaped_pad_width_2Z'TestPadWidth.test_misshaped_pad_width_2  sR    iim##F+]]:U33FF3@$G 4333s   A//B 	c                r  )rY   r   r1   Nr   r   r  r   r    test_negative_pad_widthZ$TestPadWidth.test_negative_pad_width  sO     iim##F+5]]:U33FF34( 4333r  zpad_width, dtypeNc           
     s   \         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)rY   z%`pad_width` must be of integral type.Nr1   r/   r   )r   r,   r-   r6   r7   Z	TypeErrorrO   r   )r   r3  r0   rH   r   r2   s   &&&&  r    test_bad_typeZ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                s0   \         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  r  r   r   r    test_pad_width_as_ndarrayZ&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           	     s    \         P                  ! ^4      P                  ^^4      p\        V\         P                  ! W1VR7      4       R# )rY   rJ   N)r   r,   r-   r   rO   )r   r3  rH   r   s   &&& r    test_zero_pad_widthZ TestPadWidth.test_zero_pad_widthM  s3     iim##Aq)3sD ABr"   r>   ))r   r   r*   r   )r+  r  r   )r  r.  )r   r*   ))r;   r   r   )rL   rW   r+   r   r  )Z3N)ZwordNr&   )g333333@N))r+   r;   r   r   )))g r;   r   N)rL   rK   )rK   rK   )r?   r@   rA   rB   r6   r[   r\   r]   r^   r  r  r  r   r   r  r  r  rC   rD   rE   rF   r    r  r    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"   r  c           	     s   \         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 'Z'r1   Nrh  )	r]   ZvaluesZupdater   rO   Zitemsr6   r7   r8   )rH   ZallowedZnot_allowedr  ZkeyZvaluer2   s   &      r    test_kwargsr  T  s     GK##%v& & FF9a))!'')
:4&B]]:U33FF9a6#6 43 *333s   C		Cc                  s|    \         P                  ! ^^.4      p \        \         P                  ! V ^4      . RO4       R# )rW   N)rL   rL   rW   rW   rL   rL   )r   r   r   rO   )r   s    r    test_constant_zero_defaultr  e  s)    
((Aq6
Crvvc1~'9:r"   ZconstTFc                 s    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 supportedr1   rJ   Nrh  r  )rH   r2   r(   r    test_unsupported_moder  j  sA    TF,-E	z	/	/
y!$' 
0	/	/	/s   AA"	c                 s    \         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# )r  N)NNr+   r  r:   )r   r   r3   r  )rH   r   r   r   r    test_non_contiguous_arrayr  q  s`    
))B-

1
%h
/CVVC&F<<6!!!"ad
#S)r"   c                s*   \         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.ZC)ZorderZC_CONTIGUOUSZFZF_CONTIGUOUSN)r   r   )r   r<   rO   Zflags)rH   r   r(   r    test_memory_layout_persistencer  y  sl     	s#A66!Q##N3333
s#A66!Q##N3333r"   r0   c                 s    \         P                  ! RV R7      p\         P                  ! V^VR7      pVP                  V 8X  g   Q hR# )r;   r/   rJ   N)r;   r+   rW   )r   r;  rO   r0   )r0   rH   r   r   r  r    test_dtype_persistencer    s8     ((9E
*CVVC&F<<5   r"   )r   r   r   r   )'ru  r6   Znumpyr   Znumpy.lib._arraypad_implr    Znumpy.testingr   r   r   Z_coreZsctypesrJ  r]   r   rG   r_   r  r>  rK  rs  rv  ry  r  r  r  r  r[   r\   r  r  r^   r  r  r   r  r  r  r  r>   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!r"   