+
    /i8                         ^ RI t ^ RIt^ RIHt ^ RIHtHt ^ RIH	u H
t ^ RIHt ^ RIHtHtHt ^ RIHtHt R tR t]! ]4       ! R	 R
4      4       t]! ]4       ! R R4      4       tR# )    N)_ELIMITS)bracket_rootbracket_minimum)stats)xp_assert_closexp_assert_equalxp_assert_less)xp_ravelmake_xp_test_casec                      \        V / VB pVP                  w  Vn        Vn        VP                  w  Vn        Vn        V=V=V# N)r   bracketxlxr	f_bracketflfrargskwargsress   *, _/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/optimize/tests/test_bracket.py_bracket_rootr      sB    

'
'C[[NCFCF]]NCFCFJ    c                      \        V / VB pVP                  w  Vn        Vn        Vn        VP
                  w  Vn        Vn        Vn        V=V=V# r   )	r   r   r   xmr   r   r   fmr   r   s   *, r   _bracket_minimumr   "   sL    
4
*6
*C [[CFCFCF ]]CFCFCFJr   c            	         a  ] tR t^+t o ]P
                  P                  RR4      ]P
                  P                  RR4      ]P
                  P                  RR4      ]P
                  P                  RR4      R 4       4       4       4       tR t]P
                  P                  RR]	P                  ! R	R
^
4      .4      ]P
                  P                  RRR.4      ]P
                  P                  R^R.4      ]P
                  P                  RR^.4      R 4       4       4       4       t]P
                  P                  R]! 4       R R!R".4      R 4       tR t]P
                  P                  RRRR.34      ]P
                  P                  RRR.4      ]P
                  P                  R^R.4      ]P
                  P                  RR#4      R 4       4       4       4       tR tR tR tRtV tR# )$TestBracketRootseeduse_xmin
other_sidefix_one_sidec                  a \         P                  P                  V4      pVP                  VP                  ^R7      . R
O,          4      w  rxp	^V	,           p	Wx,           p
V3R loV'       d   VP                  VP                  4       ) 4      pVP	                  VP                  W{,
          ) V,          4      VP                  V	4      ,          4      pWV,
          W) ,          ,          ,           WV,
          W^,
          ) ,          ,          ,           r\        WzWR7      pMyVP	                  VP                  W,          4      VP                  V	4      ,          4      pWW,          ,          ,
          WW^,
          ,          ,          ,
          r\        WzV	R7      pV'       d=   VR,          ) VR,          ) uVR&   VR&   V) V) rRV9   d   VP                  R4      ) VR&   V'       d   V'       d   V
) VR&   MWR&   ^ Sn        \        S3/ VB pV'       gf   VP                  ^VP                  ^,           ,          u;8X  d7   ^SP                  ^,
          ,          u;8X  d   ^V^,           ,          8X  g   Q h Q hMdVP                  VP                  ^,           ^,           u;8X  d7   SP                  ^,
          ^,           u;8X  d   V^,           ^,           8X  g   Q h Q hVP                  VP                  VP                  .4      p\        VVP                  W.4      4       VP                  VP                  VP                   .4      p\        VS! V4      4       VP                  VP                  8  g   Q hVP#                  V4      pV^ ,          V^,          ) 8X  g   Q hVP$                  ^ 8X  g   Q hVP&                  '       g   Q hR	# )   sizec                 :   < S;P                   ^,          un         V #    countxfs   &r   r0   -TestBracketRoot.test_nfev_expected.<locals>.f@       GGqLGHr   )xl0xr0factorxmin)r3   r4   r5   r4   r3   r6   xmaxN)     j@
      )nprandomdefault_rngasarrayceillogdictpopr-   r   nfevnitr   r   r   r   r   signstatussuccess)selfr!   r"   r#   r$   xprngr3   dr5   r4   r6   nlur   r   r   r   signsr0   s   &&&&&&              @r   test_nfev_expected"TestBracketRoot.test_nfev_expected-   s    ii##D)CJJAJ$6$EFVg	 ::szz|m,D}t34rvvf~EFA:vrz114:vUVQVxGW:W3Wqc6EFsuv67A69$cfsmO&;qc6:F,25M>F5M>(F5M6%=2rq"(**V"4!4v"%v!$vA(( 88q#''!)}J17719JAEJJJJJ88	1}HAH!A#qHHHHH **cffcff-.QF!34JJ/0		1W:. vv	"QxE!H9$$$zzQ{{{{r   c                j    \         P                  P                  4       P                  V4      V,
          # r   )r   	_stats_py_SimpleNormalcdf)rH   qps   &&&r   r0   TestBracketRoot.fz   s%    ,,.221599r   rW   333333?皙?gffffff?r6   Nr7   r5   333333?c                    \        V P                  VP                  R4      R W#WEP                  V4      3R7      p\        VP	                  VP
                  4      ) VP	                  VP                  4      4       R# ){Gz?)r6   r7   r5   r   N{Gz)r   r0   r>   r   rE   r   r   )rH   rW   r6   r7   r5   rI   r   s   &&&&&& r   
test_basicTestBracketRoot.test_basic}   sW     DFFBJJu$5t$#)A0@B("''#&&/:r   shapec                  a aa V'       d(   \         P                  ! RR^4      P                  V4      M\         P                  ! R4      pV3p^
o\         P                  VV 3R l4       pVV 3R lo^ Sn        \         P                  P                  R4      pVP                  VR7      ) pVP                  VR7      pRV,          RV,          rV'       d<   VP                  VR7      R8  p\         P                  ) \         P                  uW&   W&   VP                  VR7      R	,           pV! WxWW4      P                  4       pVP                  V4      VP                  V4      VP                  V	4      VP                  V
4      VP                  V4      3w  rxrp\        \        VP                  V4      4      p\        SWxWVVSR
7      p. ROpV Fr  pV Uu. uF  pVP                  \        VV4      4      NK   	  pp\        VV4      p\        \!        VVR7      VP#                  V4      4       VP$                  V8X  d   Kr  Q h	  VP&                  P(                  VP*                  8X  g   Q hV'       d'   VP-                  VP&                  ^R 4      '       g   Q hVP.                  P(                  VP0                  8X  g   Q hVP2                  P(                  VP0                  8X  g   Q hVP4                  P(                  VP0                  8X  g   Q hVP7                  VP4                  4      SP
                  ^,
          8X  g   Q h\9        VP:                  VP<                  4       \        VP>                  VP                  S P@                  ! VP:                  .VO5!  4      4       \        VPB                  VP                  S P@                  ! VP<                  .VO5!  4      4       R# u upi )rZ   ?rY   c                 :   < \        SP                  WW#WE3SR 7      # )r6   r7   r5   r   maxiter)r   r0   )r3   r4   r6   r7   r5   rW   rf   rH   s   &&&&&&r   bracket_root_single?TestBracketRoot.test_vectorization.<locals>.bracket_root_single   s"     (.T)02 2r   c                  Z   < S;P                   ^,          un         SP                  ! V / VB # r*   )f_evalsr0   )r   r   r0   rH   s   *,r   r0   -TestBracketRoot.test_vectorization.<locals>.f   s$    IINI664*6**r   # r'        @@      ?      ?re   rI   N皙)r   r   r   r   rG   rC   rD   )"r;   linspacereshapefloat64	vectorizerj   r<   r=   infravelr>   tuplemapr   getattrr   r
   stackra   rG   dtypeboolallrF   int32rC   rD   maxr	   r   r   r   r0   r   )rH   ra   rI   rW   r   rg   rJ   r3   r4   r6   r7   ir5   refsr   attrsattrrefref_attrres_attrr0   rf   s   f&&                 @@r   test_vectorization"TestBracketRoot.test_vectorization   s    <ABKKtR(007bjjQTot		2 
	2
	+ 	ii##G,zzuz%%jjej$Wc#gd


&,A "wDGTW'#-"3TCIIK(*

3C(*

4(8"**T:J(*

6(:(<$$f ST*+Asdf!%w8 CDBFG$3

73#56$HGsD)HHX"5rxx7IJ>>U***	  {{  BGG+++66#++a+,,,,zz288+++xx~~)))ww}}(((vvcgg!))a-///svvsvv&

466#&&+@4+@ AB

466#&&+@4+@ AB Hs   $O"c                n  a V3R  lpSP                  ^SP                  R7      3p\        VSP                  . RO4      SP                  . RO4      SP                  SP                  ) RSP                  ) SP                  ) ^.4      SP                  SP                  ^SP                  SP                  ^.4      V^R7      pSP                  \
        P                  \        \
        P                  \
        P                  \
        P                  .SP                  R7      p\        VP                  V4       R# )c                    < R  R R V3R lR .p\        W4       UUu. uF  w  r4V\        V4      ,          ! V4      NK  	  upp# u uppi )c                     V R ,
          # ro    r/   s   &r   <lambda>7TestBracketRoot.test_flags.<locals>.f.<locals>.<lambda>   s    q3wr   c                     V R ,
          # i  r   r   s   &r   r   r          q4xr   c                     V R ,
          # r   r   r   s   &r   r   r      r   r   c                 *   < V SP                   ,          # r   )nanr/   rI   s   &r   r   r      s    q266zr   c                     V # r   r   r   s   &r   r   r          qr   zipintxsjsfuncsr/   jrI   s   &&   r   r0   %TestBracketRoot.test_flags.<locals>.f   sF    &'') 	"E 25R=E#a&M!$===   #Ar}   )r3   r4   r6   r7   r   rf   N)      r   r   r         @)r+   r+   r+   r+   rr   )arangeint64r   r>   rw   eim_ECONVERGEDr   	_ECONVERR
_EVALUEERR
_EINPUTERRr   r   rF   )rH   rI   r0   r   r   	ref_flagss   &f    r   
test_flagsTestBracketRoot.test_flags   s    	> 		!288	,.A "

+C D "

+; <!#bffWb266'BFF7A,N!O!#RVVQ,J!K!%q2 JJ ( # # #	 0
 &(XX  /	 	

I.r   root灕Cl?V-?r}   c           	     B  aa \        SS4      oVf   TMSP                  VSR7      pVf   TMSP                  VSR7      pSP                  VSR7      pVV3R lpSP                  RR.SR7      p\        V.VO5RVRVRV3/ pSP                  VP                  4      '       g   Q hVP
                  P                  VP                  P                  u;8X  d	   S8X  g   Q h Q hVP                  P                  VP                  P                  u;8X  d	   S8X  g   Q h Q hR # )Nr   c                 B   < SP                  W,
          ^,          S4      # )r&   astype)r/   r   r}   rI   s   &&r   r0   %TestBracketRoot.test_dtype.<locals>.f   s    99ah1_e44r   r]   r6   r7   r   r^   )
r{   r>   r   r   rG   r   r}   r   r   r   )	rH   r   r6   r7   r}   rI   r0   r   r   s	   &&&&ff   r   
test_dtypeTestBracketRoot.test_dtype   s     E"|tD)F|tD)Fzz$ez,	5 **eT]%*8ALLdLLTGLvvckk""""vv||svv||4u44444vv||svv||4u44444r   c           
     B   R p\         P                  ! \        VR7      ;_uu_ 4        \        RR^4       RRR4       Rp\         P                  ! \        VR7      ;_uu_ 4        \        R R^4       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        R RR4       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        R R^RR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        R R^RR	7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        R
 R^RR7       RRR4       Rp\         P                  ! \        VR7      ;_uu_ 4        \        R R^RR7       RRR4       Rp\         P                  ! \        VR7      ;_uu_ 4        \        R VP                  RR.4      VP                  . RO4      4       RRR4       Rp\         P                  ! \        VR7      ;_uu_ 4        \        R R^RR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        R R^RR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        R R^RR7       RRR4       R#   + '       g   i     EL; i  + '       g   i     ELp; i  + '       g   i     ELI; i  + '       g   i     EL ; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELX; i  + '       g   i     EL-; i  + '       g   i     EL; i  + '       g   i     R# ; i)`func` must be callable.matchN...must be numeric and real.c                     V # r   r   r   s   &r   r   7TestBracketRoot.test_input_validation.<locals>.<lambda>       Ar   c                     V # r   r   r   s   &r   r   r      r   r   c                     V # r   r   r   s   &r   r   r      r   r   r6   c                     V # r   r   r   s   &r   r   r      r   r   r7   c                     V # r   r   r   s   &r   r   r      r   r   r5   0All elements of `factor` must be greater than 1.c                     V # r   r   r   s   &r   r   r     r   r   rn   	broadcastc                     V # r   r   r   s   &r   r   r     r   r   )`maxiter` must be a non-negative integer.c                     V # r   r   r   s   &r   r   r     r   r   ro   )rf   c                     V # r   r   r   s   &r   r   r     r   r   c                     V # r   r   r   s   &r   r   r     r   r   	shrubberyr   y            ?      @      ?)r&      r:   rr   )pytestraises
ValueErrorr   	Exceptionr>   rH   rI   messages   && r   test_input_validation%TestBracketRoot.test_input_validation   s<    -]]:W55$A& 6 1]]:W55+ua0 6]]:W55+r40 6]]:W55+r148 6]]:W55+r148 6]]:W55+r1T: 6 E]]:W55+r1S9 6 ]]9G44+rzz2r(';RZZ	=RS 5 >]]:W55+r1c: 6]]:W55+r1b9 6]]:W55+r1kB 65A 655 655555555555555 655
 544 655555555s   K#KK-LLL)L=1M0M%-M9*NK	K*	-K>	L	L&	)L:	=M	M"	%M6	9N
	N	c           	       aa V3R  lo\        SSP                  R4      SP                  R4      4      pVP                  '       g   Q hR oSP                  R4      SP                  R4      3p\        S.VO5R^ / pVP                  '       g   Q VP                  V8H  4       hVP
                  ^ 8X  g   Q hVP                  ^8X  g   Q hVP                  R8X  g   Q hR o\        SSP                  R4      SP                  R4      SP                  R4      R7      pVP                  '       g   Q h\        VP                  S! VP                  ^4      4       V3R lo^ Sn
        \        SSP                  R4      SP                  ^4      4       SP                  ^8X  g   Q h^ Sn
        \        SSP                  R4      SP                  R	4      ^R
7      pVP                  ^8X  g   Q h\        VP                  SP                  R4      RR7       \        VP                  SP                  R4      RR7       \        P                  ! RR7      ;_uu_ 4        \        SSP                  R4      SP                  R	4      ^ R7      pRRR4       \        VP                  SP                  R4      RR7       \        P                  ! RR7      ;_uu_ 4        \        SSP                  R4      SP                  R4      ^ R7      pRRR4       \        VP                  SP                  R4      RR7       \        P                  ! RR7      ;_uu_ 4        \        SSP                  R4      SP                  R	4      ^R7      pRRR4       VP                  '       d   Q hR#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     LM; i)c                 l   < SP                  V P                  R 4      '       g   Q hV ^c,          ^,
          # )zreal floatingisdtyper}   r   s   &r   r0   -TestBracketRoot.test_special_cases.<locals>.f  s,    ::agg77777Q;r   g      @c                     V ^
,
          # )r9   r   r   s   &r   r0   r     s    r6Mr         @rf   c                      W,          ^,
          # r*   r   r/   cs   &&r   r0   r   *  s    37Nr         ?r   c                 :   < S;P                   ^,          un         V # r*   r,   r.   s   &r   r0   r   4  r2   r   g      $@r           gV瞯<)atolignore)overr   Nr               r   r   ig      $g      )r   r>   rG   r   r   rD   rC   rF   r   r   r-   r;   errstate)rH   rI   r   r   r0   s   &f  @r   test_special_cases"TestBracketRoot.test_special_cases  s   	 Arzz#

2?{{{{	 ::c?BJJrN3A333vvv(svv((vww!||xx1}}zzR	 Arzz#

2!#B1{{{{#&&!-	
 aC"**R.9ww!|| Arzz"~rzz##$& xx1}}

2U;

2U; [[h''2::b>2::c?%&(C ( 	

2U;[[h''2::d#3RZZ_%&(C ( 	

2U; [[h''2::b>2::c?%&(C ( ;;;; (''
 (' ('s$   .N.N,.N?N)	,N<	?O	c           	     <   R  p\         P                  ! RR.4      p\        VR
\         P                  ) ^ V3R7      pR p. ROp. ROp. ROp. ROp\         P                  ) R\         P                  ) \         P                  ) R\         P                  ) \         P                  ) \         P                  ) .pR\         P                  RR\         P                  RRR.p\        WWgWV3R7      p\        R R\         P                  ) ^ R7      pVP                  '       g   Q hR	# )c                 <    \         P                  ! V 4      V,
          # r   r;   exp)r/   rW   s   &&r   r0   )TestBracketRoot.test_bug_fixes.<locals>.f^  s    66!9q= r   g(\?gffffff?)r3   r6   r7   r   c                 H    \         P                  ! W,          4      V,
          # r   r   )r/   rW   r   s   &&&r   r0   r   e  s    66!#;?"r   r   r3   r4   r6   r7   r   c                     V R ,           # )g      ?r   r   s   &r   r   0TestBracketRoot.test_bug_fixes.<locals>.<lambda>w  s    a$hr   )r3   r6   r7   Nrr   )gi<?gx?gt\c?gL0+?gt4?gj~?gE.K?g'2L?)r   r   r   r   r   r   r   r   )gʷG;g_.:
@gbG g9jgWM!?geg~:ZgV^ܿ)gʷG;g/B_@gŎzgH_sgЫ?gˆ-r   r         )r;   r>   r   rw   rG   )	rH   r0   rW   r   r   r3   r4   r6   r7   s	   &        r   test_bug_fixesTestBracketRoot.test_bug_fixesW  s    	! JJd|$A2RVVG!1%H	#1.B0bffWrvvgrBFF7RVVGBFFBBFFBB7ACPQFS .DwQO{{{{r   r   )i&$l   v ih0FT   r&   r   r&      r
  float16float32ru   )__name__
__module____qualname____firstlineno__r   markparametrizerP   r0   r;   rs   r_   ry   r   r   r   r   r   r  __static_attributes____classdictcell____classdict__s   @r   r    r    +   s    [[V%GH[[Z7[[\=9[[^];G < : 8 IGR: [[S3D$(C"DE[[Vb$Z0[[VaY/[[XQx0; 1 0 1 F; [[Wuwvy&IJ2C K2Ch/: [[VeeU^%<=[[Vb$Z0[[VaY/[[W&GH5 I 0 1 >5%CNBH! !r   r    c                     a  ] tR tRt o R tR tRRRRRRRRR	RR
R/R lt]P                  P                  RR)4      ]P                  P                  RR*4      ]P                  P                  RR*4      R 4       4       4       t
R t]P                  P                  RRRR.34      ]P                  P                  RR+4      ]P                  P                  RR,R.4      ]P                  P                  R	^R.4      R 4       4       4       4       t]P                  P                  RRR7      R 4       t]P                  P                  RRR.4      ]P                  P                  RR-4      ]P                  P                  RR.4      ]P                  P                  R
R/4      R 4       4       4       4       t]P                  P                  RR04      ]P                  P                  R
R14      R 4       4       t]P                  P                  RR24      ]P                  P                  R
R34      R  4       4       t]P                  P                  R!R44      R" 4       t]P                  P                  R#]! 4       R5R6R7.4      R$ 4       tR% tR& tR' tR(tV tR# )8TestBracketMinimumi{  c                "   a V3R  lo^ Sn         S# )c                 b   < S;P                   ^,          un         W,
          ^,          V,           # r*   r,   )r/   abr0   s   &&&r   r0   $TestBracketMinimum.init_f.<locals>.f~  s     GGqLGEA:>!r   r,   )rH   r0   s   &@r   init_fTestBracketMinimum.init_f}  s    	" r   c                   VP                  VP                  VP                  8  VP                  VP                  8  ,          4      '       g   Q hVP                  VP                  VP
                  8  VP                  VP
                  8  ,          VP                  VP
                  8  VP                  VP
                  8  ,          ,          4      '       g   Q hR # r   )r   r   r   r   r   r   r   )rH   resultrI   s   &&&r   assert_valid_bracket'TestBracketMinimum.assert_valid_bracket  s    vvYY"vyy699'<=
 
 	
 
 vvYY&))#		FII(=>yy699$VYY)>?@
 
 	
 
r   r3   Nr4   r5   r6   r7   r   c          	     d    Rp\        WqW$WSV34       UU	u/ uF  w  rV	f   K  WbK  	  up	p# u up	pi )r3   r3   r4   r6   r7   r5   r   )r   )
rH   r3   r4   r5   r6   r7   r   namesnamevals
   &$$$$$$   r   
get_kwargsTestBracketMinimum.get_kwargs  sG     A'*54QU2V'W
'W)$ DI'W
 	
 
s   ,,r!   r"   Tr#   c           	     \   \         P                  P                  V4      pVP                  R 4      VP                  R 4      3pVP                  VP                  ^R7      . RO,          4      w  rxrWx,           pW,           pV
^,          p
V'       Ed/   VP                  VP                  4       ) ^,          VP                  R7      p\        VP                  VP                  W},
          ) V,          4      VP                  V
4      ,          4      4      pWV,
          W) ,          ,          ,           pWV,
          W^,
          ) ,          ,          ,           pV^8  d%   WV,
          W^,
          ) ,          ,          ,           MTpV^,          V^,          8  d+   V^,          pWV,
          W) ,          ,          ,           TTpppMRp\        VP                  VP                  Wx,          4      VP                  V
4      ,          4      4      pWxW,          ,          ,
          pV^8  d   WxW^,
          ,          ,          ,
          MTpV^8  d   WxW^,
          ,          ,          ,
          MTpV^,          V^,          8  d#   V^,          pWxW,          ,          ,
          TTpppV P                  4       pRpV'       d   V) V) V) rpRVe   V) MRppV) V) V) pppV P                  W|VVWR7      p\        VVP                  V4      3/ VB pVP                  VP                  ^,           8X  g   Q hVP                  VP                  8X  g   Q hVP                  V8X  g   Q h\        VP                  V4       \        VP                   V4       \        VP"                  V4       \        VP$                  V! V.VO5!  4       \        VP&                  V! V.VO5!  4       \        VP(                  V! V.VO5!  4       V P+                  VV4       VP,                  ^ 8X  g   Q hVP.                  '       g   Q hR# )r   r'   r   Nr&  )r8   r9   r9   r:   )r;   r<   r=   r>   ru   r   r?   r@   r  r*  r   rC   rD   r-   r   r   r   r   r   r   r   r#  rF   rG   )rH   r!   r"   r#   rI   rJ   r   r3   d1d2r5   xm0r4   r6   rL   lowermiddleupperr0   r7   r   r"  s   &&&&&                 r   rP   %TestBracketMinimum.test_nfev_expected  sb    ii##D)

2

2/ !jj);>N)NOhh!8::szz|ma/rzz:BDBGGBFFSZ=4#78266&>IJKA$J
22E4ZQ377F:;a%D$JA#66SE qy5!8#Q$J
22E6  %v DBGGBFF38,rvvf~=>?AVY,&E/01uSfsm++#F./!eCVc]**E qy5!8#QVY,&v  %v KKM D3$cC(8ud$D$)6F7UF56E4d6 ! 
 "!RZZ_?? {{fjj1n,,,{{agg%%%zzQ 			5)		6*		5)		1U?T?3		1V#3d#34		1U?T?3!!&"-}}!!!~~~~r   c           
     8  a V3R  lpSP                  ^SP                  R7      3pSP                  . RO4      pSP                  . RO4      pSP                  . RO4      pSP                  SP                  ) RSP                  ) SP                  ) R.4      p\	        W%WFVV^R7      pSP                  \
        P                  \        \
        P                  \
        P                  \
        P                  .SP                  R7      p	\        VP                  V	4       R# )	c                    < R  R R V3R lR .p\        W4       UUu. uF  w  r4V\        V4      ,          ! V4      NK  	  upp# u uppi )c                 "    V R ,
          ^,          # r   r   r   s   &r   r   :TestBracketMinimum.test_flags.<locals>.f.<locals>.<lambda>  s    C!|r   c                     V # r   r   r   s   &r   r   r7    r   r   c                     V # r   r   r   s   &r   r   r7    r   r   c                 :   < SP                  SP                  4      # r   )r>   r   r   s   &r   r   r7    s    rzz"&&1r   c                     V ^,          # r
  r   r   s   &r   r   r7    s    q!tr   r   r   s   &&   r   r0   (TestBracketMinimum.test_flags.<locals>.f  sF    +  1#	%E 25R=E#a&M!$===r   r   g       @)r3   r4   r6   r   rf   Nr   )r   r   r   r         @)r   r   r   r   r   )r   r   r   r          @)r   r   r>   rw   r   r   r   r   r   r   r   r   r   rF   )
rH   rI   r0   r   r3   r/  r4   r6   r"  reference_flagss
   &f        r   r   TestBracketMinimum.test_flags  s    	> 		!288	,.jj67jj23jj23zzBFF7D266'BFF7C@A!!c'+Q8 **coox&)mmS^^&)nn&6=?XX % G 	7r   minimumr   r   r}   c           
       aa \        SS4      oVf   TMSP                  VSR7      pVf   TMSP                  VSR7      pSP                  VSR7      pVV3R lp. ROw  rxp	\        VSP                  VSR7      SP                  VSR7      SP                  V	SR7      W#V3R7      p
SP                  V
P                  4      '       g   Q hV
P
                  P                  V
P                  P                  u;8X  d%   V
P                  P                  u;8X  d	   S8X  g   Q h Q hV
P                  P                  V
P                  P                  u;8X  d%   V
P                  P                  u;8X  d	   S8X  g   Q h Q hR # )Nr   c                 B   < SP                  W,
          ^,          S4      # r<  r   )r/   rB  r}   rI   s   &&r   r0   )TestBracketMinimum.test_dtypes.<locals>.f  s    99akA-u55r   r   )r^   r   r]   )r{   r>   r   r   rG   r   r}   r   r   r   r   r   )rH   rB  r6   r7   r}   rI   r0   r3   r/  r4   r"  s   &&&&ff     r   test_dtypesTestBracketMinimum.test_dtypes  s+   
 E"|tD)F|tD)F**WE*2	6 +#!rzz#Uz+Cu1M

3e
,4'
 vvfnn%%%%yy&))//MVYY__MMMMMMyy&))//MVYY__MMMMMMr   zstr/object arrays)np_onlyreasonc           	        R p\         P                  ! \        VR7      ;_uu_ 4        \        RR^R7       RRR4       Rp\         P                  ! \        VR7      ;_uu_ 4        \        R VP	                  R4      4       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        R VP	                  R4      RR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        R VP	                  R4      RR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        R	 VP	                  R4      RR
7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        R VP	                  R4      RR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        R VP	                  R4      RR7       RRR4       Rp\         P                  ! \        VR7      ;_uu_ 4        \        R VP	                  R4      RR7       RRR4       Rp\         P                  ! \        VR7      ;_uu_ 4        \        R VP	                  RR.4      . ROR7       RRR4       Rp\         P                  ! \        VR7      ;_uu_ 4        \        R VP	                  R4      ^RR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        R VP	                  R4      ^R R7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        R VP	                  R4      ^RR7       RRR4       R#   + '       g   i     ELY; i  + '       g   i     EL"; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL}; i  + '       g   i     ELF; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL_; i  + '       g   i     EL'; i  + '       g   i     R# ; i)!r   r   N)r3   r   c                     V ^,          # r<  r   r   s   &r   r   :TestBracketMinimum.test_input_validation.<locals>.<lambda>!      q!tr   c                     V ^,          # r<  r   r   s   &r   r   rL  #  rM  r   c                     V ^,          # r<  r   r   s   &r   r   rL  %  rM  r   r4   c                     V ^,          # r<  r   r   s   &r   r   rL  '  rM  r   r   c                     V ^,          # r<  r   r   s   &r   r   rL  )  rM  r   r   c                     V ^,          # r<  r   r   s   &r   r   rL  +  rM  r   r   r   c                     V # r   r   r   s   &r   r   rL  /  s    qr   rn   z/Array shapes are incompatible for broadcasting.c                     V ^,          # r<  r   r   s   &r   r   rL  3  rM  r   r   c                     V ^,          # r<  r   r   s   &r   r   rL  7  rM  r   ro   )r4   rf   c                     V ^,          # r<  r   r   s   &r   r   rL  9  rM  r   c                     V ^,          # r<  r   r   s   &r   r   rL  ;  rM  r   ekkir   r   r   r   )r   r   r  rr   )r   r   r   r   r>   r   s   && r   r   (TestBracketMinimum.test_input_validation  s    -]]:W55T21- 6 1]]:W55^RZZ-=> 6]]:W55^RZZ^F 6]]:W55^RZZ^F 6]]:W55^RZZ^$G 6]]:W55^RZZ^$G 6]]:W55^RZZ^DI 6 E]]:W55["**R.E 6 D]]:W55^RZZR-A|T 6 >]]:W55^RZZ^CP 6]]:W55^RZZ^BO 6]]:W55^RZZ^FS 65= 655 655555555555555555 655 655 655555555s   N$N-N.8OOO*O>&P3#P& P: Q Q"N	N+	.N?	O	O'	*O;	>P	P#	&P7	:Q	Q	"Q3	r   r/  c           
     |   V P                  4       pV P                  W\        \        VP                  V4      4      R 7      p\        WeP	                  W%P                  R7      3/ VB pV P                  W4       VP                  ^ 8X  g   Q hVP                  '       g   Q hVP                  VP                  8X  g   Q hR# )r3   r4   r   r   N)r  r*  ry   rz   r>   r   ru   r#  rF   rG   rC   r-   )	rH   r3   r/  r4   r   rI   r0   r   r"  s	   &&&&&&   r   test_scalar_no_limits(TestBracketMinimum.test_scalar_no_limits=  s     KKMSc"**d>S8TU!!ZZ::Z%FQ&Q!!&-}}!!!~~~~{{agg%%%r   zxl0,xm0,xr0,xminc                h   V P                  4       pV P                  WV\        \        VP                  V4      4      R 7      p\        WvP	                  V4      3/ VB p	V P                  W4       V	P                  ^ 8X  g   Q hV	P                  '       g   Q hV	P                  VP                  8X  g   Q hR# ))r3   r4   r6   r   N)r  r*  ry   rz   r>   r   r#  rF   rG   rC   r-   )
rH   r3   r/  r4   r6   r   rI   r0   r   r"  s
   &&&&&&&   r   test_scalar_with_limit_left.TestBracketMinimum.test_scalar_with_limit_leftS  s    : KKMS&+C

D,A&B ! D!!ZZ_??!!&-}}!!!~~~~{{agg%%%r   zxl0,xm0,xr0,xmaxc                  a V P                  4       p\        ;QJ d    . V3R  lV 4       F  NK  	  5M! V3R  lV 4       4      pV P                  WWER7      p\        VSP	                  VSP
                  R7      3/ VB p	V P                  V	S4       V	P                  ^ 8X  g   Q hV	P                  '       g   Q hV	P                  VP                  8X  g   Q hR# )c              3   ^   <"   T F"  pSP                  VSP                  R 7      x  K$  	  R# 5ir   Nr>   ru   .0argrI   s   & r   	<genexpr>BTestBracketMinimum.test_scalar_with_limit_right.<locals>.<genexpr>  %     G$3RZZ2::Z66$   *-)r3   r4   r7   r   r   N)r  ry   r*  r   r>   ru   r#  rF   rG   rC   r-   )
rH   r3   r/  r4   r7   r   rI   r0   r   r"  s
   &&&&&&f   r   test_scalar_with_limit_right/TestBracketMinimum.test_scalar_with_limit_righty  s    4 KKMuG$GuuG$GGSH!!RZZ2::Z%FQ&Q!!&"-}}!!!~~~~{{agg%%%r   zxl0,xm0,xr0,xmin,xmax,argsc                j   V P                  4       pV P                  W4V\        \        VP                  V4      4      R 7      p	\        WP	                  V4      3/ V	B p
V
P                  R8X  g   Q hV^ ,          V
P                  V
P                  39   g   Q hV
P                  VP                  8X  g   Q hR# ))r4   r6   r7   r   Nrr   )r  r*  ry   rz   r>   r   rF   r   r   rC   r-   )rH   r3   r/  r4   r6   r7   r   rI   r0   r   r"  s   &&&&&&&&   r   test_minimum_at_boundary_point1TestBracketMinimum.test_minimum_at_boundary_point  s    z KKMS$&+C

D,A&B ! D!!ZZ_??}}"""Aw699fii0000{{agg%%%r   ra   c                  a aa V'       d(   \         P                  ! RR^4      P                  V4      MRpVR3p^
o\         P                  VV 3R l4       pS P	                  4       p\         P
                  P                  R4      pVP                  VR7      ) pVP                  VR7      p	WP                  VR7      W,
          ,          ,           p
RV,          RV	,          rV'       d<   VP                  VR7      R8  p\         P                  ) \         P                  uW&   W&   VP                  VR7      R	,           pV! WWWV4      P                  4       p\        ;QJ d    . V3R
 lV 4       F  NK  	  5M! V3R
 lV 4       4      p\        VSP                  V
4      SP                  V4      SP                  V	4      SP                  V4      SP                  V4      SP                  V4      VSR7	      p. ROpV Fr  pV Uu. uF  pSP                  \        VV4      4      NK   	  pp\        VV4      p\        \        VSR7      SP                  V4      4       VP                   V8X  d   Kr  Q h	  VP"                  P$                  SP&                  8X  g   Q hV'       d'   SP)                  VP"                  ^R 4      '       g   Q hVP*                  P$                  SP,                  8X  g   Q hVP.                  P$                  SP,                  8X  g   Q hVP0                  P$                  SP,                  8X  g   Q hSP3                  VP0                  4      VP4                  ^,
          8X  g   Q hS P7                  VS4       \        VP8                  V! VP:                  .VO5!  4       \        VP<                  V! VP>                  .VO5!  4       \        VP@                  V! VPB                  .VO5!  4       R# u upi )rZ   rc   rY   r   c                 F   < \        SP                  4       WW#WESVR 3R7	      # )r   )r3   r4   r6   r7   r5   rf   r   )r   r  )	r/  r3   r4   r6   r7   r5   r  rf   rH   s	   &&&&&&&r   bracket_minimum_singleETestBracketMinimum.test_vectorization.<locals>.bracket_minimum_single	  s(    #DKKM3S)-g*+S3 3r   rl   r'   rm   rn   ro   c              3   ^   <"   T F"  pSP                  VSP                  R 7      x  K$  	  R# 5ird  re  rf  s   & r   ri  8TestBracketMinimum.test_vectorization.<locals>.<genexpr>  rk  rl  )r3   r4   r6   r7   r5   r   rf   rp   Nrq   )	r   r   r   r   r   r   rG   rC   rD   rr   )"r;   rs   rt   rv   r  r<   r=   rw   rx   ry   r   r>   r{   r   r
   r|   ra   rG   r}   r~   r   rF   r   rC   rD   r   r-   r#  r   r   r   r   r   r   )rH   ra   rI   r  r   rt  r0   rJ   r3   r4   r/  r6   r7   r   r5   r   r   r   r   r   r   r   rf   s   f&f                   @r   r   %TestBracketMinimum.test_vectorization  s    <ABKKtR(007c2w		3 
	3
 KKMii##G,zzuz%%jjej$JJEJ*ci88Wc#gd


&,A "wDGTW'#-%c4KQQSuG$GuuG$GGq"**S/rzz##%::c?D9I$&JJt$4RZZ=O$(';
 ODBFG$3

73#56$HGsD)HHX"5rxx7IJ>>U***	  {{  BGG+++66#++a+,,,,zz288+++xx~~)))ww}}(((vvcgg!''A+---!!#r*#&& 04 01#&& 04 01#&& 04 01 Hs   $O9c                  a V3R  lp\        VSP                  RSP                  R7      ^R7      pVP                  '       g   Q hR pSP                  R4      SP                  R4      SP                  R4      rep\        W%WF^ R7      p\	        VP
                  V4       \	        VP                  V4       \	        VP                  V4       R p\        VSP                  R4      SP                  R4      R	7      pVP                  '       g   Q h\        VP                  V! VP
                  ^4      4       V P                  4       pSP                  R4      SP                  R4      SP                  R4      repSP                  R
4      SP                  R
4      3p\        W%WFVR7      pVP                  ^8X  g   Q h\	        VP
                  V4       \	        VP                  V4       \	        VP                  V4       \	        VP                  V! V.VO5!  4       \	        VP                  V! V.VO5!  4       \	        VP                  V! V.VO5!  4       R# )c                 l   < SP                  V P                  R 4      '       g   Q hV ^b,          ^,
          # )numericr   r   s   &r   r0   0TestBracketMinimum.test_special_cases.<locals>.f9  s,    ::aggy11117Q;r   r   rP  c                 "    V ^,          ^
,
          # r<  r   r   s   &r   r0   r|  A  s    a4"9r   r   r   r?  )r3   r4   rf   c                 .    W^,          ,          ^,
          # r<  r   r   s   &&r   r0   r|  K  s    T6A:r   r   r   r\  Nr   r   r   皙ɿ)r   r>   ru   rG   r   r   r   r   r   r   r  r-   r   r   )rH   rI   r0   r"  r3   r/  r4   r   s   &f      r   r   %TestBracketMinimum.test_special_cases4  s   
	 "!RZZ2::Z%FAN~~~~	 

3C"**R.#!!cAF		3'		3'		3'	 "!RZZ_2::b>J~~~~		1VYY?3 KKM

4("**T*:BJJsO#

2

2/!!cFww!||		3'		C(		3'		1S=4=1		1S=4=1		1S=4=1r   c                   aaa SP                  R 4      SP                  R4      uooVVV3R lp\        VSP                  R4      SSR7      p\        VP                  S4       R# )gJg7e4?[2\WZ?c                 t   < SP                  S4      SP                  S4      r!W!,
          V ,          R,          ) # r+   rr   r@   r/   log_alog_br7   r6   rI   s   &  r   r0   0TestBracketMinimum.test_gh_20562_left.<locals>.fe  s/    66$<5mQ&+++r   g_\ݶ?r6   r7   N)r>   r   r   r   rH   rI   r0   r"  r7   r6   s   &f  @@r   test_gh_20562_left%TestBracketMinimum.test_gh_20562_left`  sT     ZZ
+RZZ
-C
d	, "!RZZ0B%C$'+-		4(r   c                   aaa SP                  R4      SP                  R4      uooVVV3R lp\        VSP                  R4      SSR7      p\        VP                  S4       R# )r  c                 v   < SP                  S) 4      SP                  S) 4      r!W!,
          V ,          R,          # r  r  r  s   &  r   r0   1TestBracketMinimum.test_gh_20562_right.<locals>.fr  s0    664%="&&$-5]A%**r   r  Ng[2\WZgJg7e4̿g_\ݶ)r>   r   r   r   r  s   &f  @@r   test_gh_20562_right&TestBracketMinimum.test_gh_20562_rightm  sT     ZZ,bjj.E
d	+ "!RZZ0C%D'+$8		4(r   r   )l	   ^0#,N0Lb*& l	   }SES].HMa l	   FDuBP_KU r  r  r  )rZ   皙?g333333?)皙?皙?rY   N))r[   r   )r  r   )r  r   )r  r   )g@r   )gffffff5@r   )gffffff^@r   )g@r   )gr   )g)r   )gfffffFbr   ))rn         ?r   r   )r         @r   r   )r?  r   r>  r   )g      (@      0@      4@r   )Nr  r   r   )Nr  r   r   )Nr   r>  r   )Nr  r  r   ))r   r   )gYnr   )g#B;r   )r  r   )r  r   )r  r   ))r  333333?r  r   )rZ   333333?r  r   )r  皙r   r   )3333335333331gffffff,r   )r  r  Nr   )rZ   r  Nr   )r  r  Nr   )r  r  Nr   ))g?r   )g?r   )gffffff?r   )rn   r   ))r  r  r  Nr   r   r   )gffffff?333333?r  r  Nr  r   )g@      
@g333333@N皙X@r  r   )r         @r:   L:Nr  r   )Nr  NNr   r  )Nr  Nr  Nr  )Nr  NNr  r  )Nr  Nr  Nr  r  r  r	  )r  r  r  r  r  r#  r*  r   r  r  rP   r   rF  skip_xp_backendsr   r]  r`  rm  rp  ry   r   r   r  r  r  r  r  s   @r   r  r  {  s    


#'
04
;?
FJ
QU
 [[	
 [[Z7[[\=9E : 8EN84 [[Y(?@[[W&GH[[Vb$Z0[[VaY/N 0 1 I AN$ [[!!$7J!K#T L#TJ [[US$K0[[U$56[[U$9: [[	
&	 ; 7 1& [[	
" [[ 

&
#8& [[	
  [[ 
&!2& [[$X	
[x&y[x& [[Wuw	&JK02 L02d*2X)) )r   r  )r   numpyr;   scipy.optimize._bracketr   scipy.optimize.elementwiser   r   (scipy._lib._elementwise_iterative_method_lib_elementwise_iterative_methodr   scipyr   scipy._lib._array_api_no_0dr   r   r	   scipy._lib._array_apir
   r   r   r   r    r  r   r   r   <module>r     st      , D 6 6 9 9 = < L L !L^
 ?#|) |) $|)r   