+
    /i                     R    ^ RI t^ RIHtHt ^ RIt^ RIHt ^ RIH	t	  ! R R4      t
R# )    N)assert_allcloseassert_equal)pava)isotonic_regressionc                     a  ] tR t^	t o ]P
                  P                  R^ ^..RR3^ ^.^^..R3^ ^.^.R3^^^.R3^^.^R3^ ^.^ ^.R3.4      R 4       tR t]P
                  P                  R]	P                  ]	P                  ]	P                  ]	P                  .4      ]P
                  P                  R	]	P                  ]	P                  ]	P                  ]	P                  .4      ]P
                  P                  RRR
.4      R 4       4       4       t]P
                  P                  RRR.4      R 4       tR tR tR tR tRtV tR# )TestIsotonicRegressionwNz7array has incorrect number of dimensions: 2; expected 1z<Input arrays y and w must have one dimension of equal lengthz#Weights w must be strictly positivec                    \         P                  ! \        VR 7      ;_uu_ 4        \        WR7       RRR4       R#   + '       g   i     R# ; i))match)yweightsN)pytestraises
ValueErrorr   )selfr   r	   msgs   &&&&k/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/optimize/tests/test_isotonic_regression.pytest_raise_error'TestIsotonicRegression.test_raise_error
   s,    $ ]]:S11!/ 2111s	   <A	c                l   \         P                  ! . RO\         P                  R7      p\         P                  ! V4      p\         P                  ! VP
                  ^ ,          ^,           R\         P                  R7      p\        WV4       \        V. RO4       \        V. RO4       \        V. RO4       R# )	   dtype)shape
fill_valuer   Nr      r      r   r   r   r   r   r   r   r   r   r   )      r"   r"   r"   r"   r"   )r   r!      r   r   r   r   r   )	nparrayfloat64	ones_likefullr   intpr   r   )r   r   r	   rs   &   r   test_simple_pava'TestIsotonicRegression.test_simple_pava   sr     HH*"**=LLOGG!''!*q.RrwwGQ1010189    y_dtypew_dtypeonesc                (   \         P                  ! . ROVR7      pVe   \         P                  ! WBR7      p\        WAR7      pVP                  P
                  \         P                  8X  g   Q hVP                  P
                  \         P                  8X  g   Q h\        VP                  . RO4       \        VP                  ^^.4       \        VP                  . RO4       \        V\         P                  ! . RO\         P                  R7      4       R# )r   r   Nr   r   r    )r   r!   r#   )r$   r%   r'   r   xr   r&   r   r   blocksr   )r   r	   r/   r.   r   ress   &&&&  r   test_simple_isotonic_regression6TestIsotonicRegression.test_simple_isotonic_regression,   s     HH*':=Q.A!!/uu{{bjj((({{  BJJ...45aV,

I.Q!6bjjIJr-   
increasingTFc                    ^
pV'       d   \         P                  ! ^ ^V4      M\         P                  ! ^^ V4      p\        W1R7      p\        VP                  V4       \        VP
                  \         P                  ! V^,           4      4       R# )
   r8   N)r$   linspacer   r   r3   r4   arange)r   r8   nr   r5   s   &&   r   test_linspace$TestIsotonicRegression.test_linspace>   s]    $.BKK1a BKK1a4H!!;q!

BIIa!e$45r-   c                   \         P                  ! . RO4      p\         P                  ! . RO4      p\        W!R7      p\        VP                  . RO4       \        VP
                  . R	O4       \        VP                  . R
O4       \         P                  ! . RO4      p\         P                  ! . RO4      p\        WTR7      p\        \         P                  ! VP                  R,          4      ^ 4       \        VP                  R,          VP                  4       \        VP
                  VP
                  4       \        VP                  R,          ^,
          VP                  R,          4       R# )r"   r2   :r   r#   N:r   NN:r"   NNN)r"   r            ?rC   rC   r"      )rD   r   r"   r:   	   r      r:   )      ?rG   rG   rE   rE   rE         )@rH   )r   rG   r   )r   rD   r!   r   )r"   r   r"   r"   r"   r"   r"   rC   rC   rC   r"   rD   )rD   r   r"   r"   r"   r"   r"   r:   rE   r   rF   r:   )r$   r%   r   r   r3   r   r4   diff)r   r	   r   r5   w2y2res2s   &      r   test_weights#TestIsotonicRegression.test_weightsF   s    HH34HH01!!/FG[1

L1 XX@AXX=>"22s,a0r
CEE*ckk2B!+SZZ^<r-   c                   . R/Op\        V4      p. R0Op\        VP                  V4       \        VP                  . R1O4       ^dp\
        P                  ! ^ ^VRR7      p^V,          \
        P                  ! ^
V,          4      ,           p\        V4      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R#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR,NR,NR,NR,NR,NR,NR,NR,NR,NR,NR,NR,NR,NR,NR,NR,NR,NR,NR,NR,NR,Np\        VP                  V4       \
        P                  ! \
        P                  ! VP                  4      ^ 8  4      '       g   Q h\        \
        P                  ! VP                  4      \
        P                  ! V4      4       \        V) RR-7      p\        VP                  ) VP                  4       \        VP                  VP                  4       R.# )2r   F)numendpointg        g_ӽ-?gO*e?g%2g?g;ك?g6Y:tW?g>l&?g?g:ǰ?g{?g!:Fv?gEr/?gk;?g$'
"?gV ?gQk?v?g0n?g<?g [ @g7Y@g[d@g2-ڱ{@g+@g>	l@goT@gZO"@gN%U	@glJ
@gt NԐ@go@gDN>	@gVi$'@glO@gc@g]@gǾ@g{ur @gfue@g@gkY@gHZ@gDFjv@r;   N)
r   r!   r   rD   rB   r   r"   r#   rE   r   )
r   8T笪@rR   rR   rR   rR   rR   8T笪@rS   rS   )r   r"   r#   r:   )r   r   r3   r   r4   r$   r<   sinallrI   sum)r   r   r5   x_Rr>   res_invs   &     r   test_against_R_monotone.TestIsotonicRegression.test_against_R_monotoneX   s   *!!$

 	s#SZZ/KK1!e4EBFF26N"!!$

"
$.
0:
<F
HR

"
$.
0:
<F
HR
 
 #
 %/
 1;
 =G
 IS
 	
 #	
 %/	
 1;	
 =G	
 IS	

 

 #

 %/

 1;

 =G

 IS
 
 #
 %/
 1;
 =G
 IS
 
 #
 %/
 1;
 =G
 IS
 
 #
 %/
 1;
 =G
 IS
 
 #
 %/
 1;
 =G
 IS
 
 #
 %/
 1;
 =G
 IS
 
 #
 %/
 1;
 =G
 IS
 
 #
 %/
 1;
 =G
 IS
 
 #
 %/
 1;
 =G
 IS
 
 #
 %/
 1;
 =G
 IS
 
 #
 %/
 1;
 =G
 IS
  !
  #!
  %/!
  1;!
  =G!
  IS!
" #
" ##
" %/#
" 1;#
& 	s# vvbggceen)**** 	suurvvay1 &qbU;
CEE*W^^SZZ0r-   c                :   \         P                  ! ^\        R7      p\         P                  ! ^\        R7      pRVP                  n        RVP                  n        \        WR7      p\         P                  ! \         P                  ! VP                  4      4      '       g   Q h\         P                  ! \         P                  ! VP                  4      4      '       g   Q h\         P                  ! \         P                  ! VP                  4      4      '       g   Q hR# )rD   r   Fr2   N)r$   r=   floatr0   flags	writeabler   rU   isfiniter3   r   r4   r   r3   r	   r5   s   &   r   test_readonly$TestIsotonicRegression.test_readonly   s    IIau%GGAU#!!!!/vvbkk#%%())))vvbkk#++.////vvbkk#**-....r-   c                   \         P                  ! ^
\        R7      R,          p\         P                  ! ^
\        R7      R,          pVP                  P
                  '       d   Q hVP                  P                  '       d   Q hVP                  P
                  '       d   Q hVP                  P                  '       d   Q h\        WR7      p\         P                  ! \         P                  ! VP                  4      4      '       g   Q h\         P                  ! \         P                  ! VP                  4      4      '       g   Q h\         P                  ! \         P                  ! VP                  4      4      '       g   Q hR# )r:   r   :NNrD   r2   N)r$   r=   r\   r0   r]   c_contiguousf_contiguousr   rU   r_   r3   r   r4   r`   s   &   r   test_non_contiguous_arrays1TestIsotonicRegression.test_non_contiguous_arrays   s    IIb&s+GGBe$S)77'''''77'''''77'''''77'''''!!/vvbkk#%%())))vvbkk#++.////vvbkk#**-....r-    )r   r	   r   )__name__
__module____qualname____firstlineno__r   markparametrizer   r+   r$   r&   float32int64int32r6   r?   rM   rY   ra   rf   __static_attributes____classdictcell__)__classdict__s   @r   r   r   	   s    [[!fXtFHVq!fXKMVaSKMAKMVQKMVaV24	
"0#"0: [[YRZZ288(TU[[YRZZ288(TU[[S4.1K 2 V VK [[\D%=96 :6=$61p
// /r-   r   )numpyr$   numpy.testingr   r   r   scipy.optimize._pava_pybindr   scipy.optimizer   r   rh   r-   r   <module>ry      s      7  , .^/ ^/r-   