+
    LV-jg  ã                   óZ   € R t ^ RIHtHt ^ RIt^ RIHtHt ^ RI	t
^ RIHt  ! R R4      tR# )z5
Unit tests for optimization routines from _root.py.
)Úassert_Úassert_equalN)ÚraisesÚwarns©Úrootc                   ó†   a € ] tR t^t o R tR tR tR tR t]	P                  P                  R. R
O4      R 4       tRtV tR	# )ÚTestRootc           	     óü  € R  pR pR	 Fï  pVR
9   d   K  VR9   d   TpMRp\        VRR.VRVR7      p\        VRR.VRVR7      pV RV! VP                  4       RV! VP                  4       2p\        VP                  V4       \        VP                  V4       \        \	        V! VP                  4      4      P                  4       \	        V! VP                  4      4      P                  4       8  V4       Kñ  	  R# )c                 ór   € V w  r\         P                  ! V^,          ^,
          V^,          ^,
          .4      # ©é   ©ÚnpÚarray©ÚzÚxÚys   &  Úp/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/scipy/optimize/tests/test__root.pyÚfuncÚ)TestRoot.test_tol_parameter.<locals>.func   ó-   € Ø‰DˆAÜ—8’8˜Q �T A�X q¨!¥t¨a¥xÐ0Ó1Ð1ó    c                 óz   € V w  r\         P                  ! ^V^,          ,          ^ .^ ^V^,          ,          ..4      # r   r   r   s   &  r   ÚdfuncÚ*TestRoot.test_tol_parameter.<locals>.dfunc   s5   € Ø‰DˆAÜ—8’8˜a  1¥�f a˜[¨1¨a°°1µ­f¨+Ð6Ó7Ð7r   Nçš™™™™™ñ?g-Cëâ6?)ÚjacÚtolÚmethodç      à?z: z vs. )ÚhybrÚlmÚbroyden1Úbroyden2ÚandersonÚdiagbroydenÚkrylov)ÚlinearmixingÚexcitingmixing)r"   r#   )r   r   r   ÚsuccessÚabsÚmax)Úselfr   r   r    r   Úsol1Úsol2Úmsgs   &       r   Útest_tol_parameterÚTestRoot.test_tol_parameter   sâ   € ò	2ò	8ó0ˆFàÐ;Ô;áà˜Ô'Ø‘à�ä˜˜s 3˜i¨S°dÀ6ÔJˆDÜ˜˜s 3˜i¨S°cÀ&ÔIˆDØ�H˜B™t D§F¡F›|˜n¨E±$°t·v±v³,°Ð@ˆCÜ�D—L‘L #Ô&Ü�D—L‘L #Ô&Ü”C™˜TŸV™V›Ó%×)Ñ)Ó+¬c±$°t·v±v³,Ó.?×.CÑ.CÓ.EÑEØöó!0r   c                ó„   € R  pR F6  p\        \        P                  \        P                  ! ^4      VRV/R7       K8  	  R# )c                 ó&   € \        V ^ ,          4      # )é    )r,   ©r   s   &r   ÚnormÚ$TestRoot.test_tol_norm.<locals>.norm,   s   € Ü�q˜•t“9Ðr   Útol_norm)r    ÚoptionsN)r*   r'   r)   r&   r$   r%   r(   )r   r   Ú
zeros_likeÚzeros)r.   r8   r    s   &  r   Útest_tol_normÚTestRoot.test_tol_norm*   s7   € ò	ó!ˆFô ”—‘¤§¢¨£°FØ# TÐ*÷,ó!r   c                ó0   € RR lp\        VRR.RR7       R# )é   c                 ór   € V w  r#\         P                  ! V^,          ^,
          V^,          V,
          .4      # r   r   )r   Úfr   r   s   &&  r   r   Ú=TestRoot.test_minimize_scalar_coerce_args_param.<locals>.func<   r   r   r   g      ø?)ÚargsN©rA   r   )r.   r   s   & r   Ú&test_minimize_scalar_coerce_args_paramÚ/TestRoot.test_minimize_scalar_coerce_args_param:   s   € ô	2ô 	ˆT�C˜�: C×(r   c                ó°   €  ! R  R4      pV! 4       p\        \        4      ;_uu_ 4        \        VRR.RR7       RRR4       R#   + '       g   i     R# ; i)c                   ó,   a € ] tR t^Et o R tR tRtV tR# )Ú!TestRoot.test_f_size.<locals>.func                ó   € ^ V n         R# )r6   N©Úcount)r.   s   &r   Ú__init__Ú*TestRoot.test_f_size.<locals>.fun.__init__F   s	   € Ø�–
r   c                ó¼  € V ;P                   ^,          un         V P                   ^,          '       g=   V^ ,          RV^ ,          V^,          ,
          ^,          ,          ,           R,
          pV# V^ ,          RV^ ,          V^,          ,
          ^,          ,          ,           R,
          RV^,          V^ ,          ,
          ^,          ,          V^,          ,           .pV# )rA   r!   g      ð?rM   )r.   r   Úrets   && r   Ú__call__Ú*TestRoot.test_f_size.<locals>.fun.__call__I   s¥   € Ø—
’
˜a••
àŸ
™
 QŸœØ˜A�$ ¨¨!­¨q°­t­¸Õ'9Õ!9Õ9¸CÕ?�Cð
 �
ð ˜a�D 3¨!¨A­$°°1µ­+¸!Õ);Õ#;Õ;¸cÕAØ ! A¥$¨¨1­¥+°!Õ!3Õ3°a¸µdÕ:ð<�Cð �
r   rM   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__rO   rS   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   ÚfunrK   E   s   ø‡ € ò÷	ð 	r   r]   çš™™™™™¹?g        r#   )r    N)Úassert_raisesÚ
ValueErrorr   )r.   r]   ÚFs   &  r   Útest_f_sizeÚTestRoot.test_f_sizeA   s?   € ÷	ñ 	ñ ‹EˆÜœ:×&Õ&Ü��S˜#�J tÕ,÷ '×&×&Ò&ús   ©AÁA	c           
     ór  aa€ R  oR oVV3R lp\         P                  ! ^4      p\        SVR
RR7      pRp\        \        VR7      ;_uu_ 4        \        SVR
RSR7      pRRR4       \        \        VR7      ;_uu_ 4        \        WR
RR	R7      pRRR4       \        XP                  VP                  4       \        XP                  VP                  4       VP                  VP                  u;J d   VP                  u;J d   R	J g   Q h Q hR#   + '       g   i     Lº; i  + '       g   i     Lœ; i)c                 óÎ   € ^V ^ ,          ,          RV ^,          ^,          ,          ,
          ^
,           RV ^ ,          ^,          ,          ^V ^,          ,          ,           ^,
          .# )r   g      Ð?r^   © ©r   Úignoreds   &&r   r]   Ú#TestRoot.test_gh_10370.<locals>.fun\   sI   € Ø�a˜•d•F˜T ! A¥$¨¥'�\Õ)¨BÕ.°°A°aµD¸!µGµ¸aÀÀ!Å½fÕ0DÀqÕ0HÐIÐIr   c                 óJ   € ^RV ^,          ,          .RV ^ ,          ,          ^..# )r   r!   gš™™™™™É?rf   rg   s   &&r   ÚgradÚ$TestRoot.test_gh_10370.<locals>.grad_   s%   € Ø˜˜a �d�
�O c¨A¨a­D¥j°! _Ð5Ð5r   c                 ó$   <€ S! W4      S! W4      3# )Nrf   )r   rh   r]   rk   s   &&€€r   Úfun_gradÚ(TestRoot.test_gh_10370.<locals>.fun_gradb   s   ø€ Ù�q“?¡D¨Ó$4Ð4Ð4r   r(   )rE   r    z'Method krylov does not use the jacobian)Úmatch)rE   r    r   NTrF   )r   r=   r   Úassert_warnsÚRuntimeWarningr   r   r+   )	r.   rn   Úx0ÚrefÚmessageÚres1Úres2r]   rk   s	   &      @@r   Útest_gh_10370ÚTestRoot.test_gh_10370X   sÝ   ù€ ò	Jò	6ö	5ô �XŠX�a‹[ˆä�3˜ ¨hÔ7ˆØ;ˆÜœ.°×8Ö8Ü˜˜R d°8ÀÔFˆD÷ 9äœ.°×8Ö8Ü˜¨4¸ÀdÔKˆD÷ 9ô 	�T—V‘V˜SŸU™UÔ#Ü�T—V‘V˜SŸU™UÔ#Ø�|‰|˜tŸ|™|ÕB¨s¯{©{ÕB¸dÓBÐBÑBÐBÒB÷ 9×8úç8×8ús   ÁDÂD&ÄD#	Ä&D6	r    c                óP   € R  p\        V^.VR7      pVP                  V8X  g   Q hR# )c                 ó   € V ^,
          # rF   rf   r7   s   &r   r   Ú,TestRoot.test_method_in_result.<locals>.funcw   s   € Ø�q•5ˆLr   )rs   r    N)r   r    )r.   r    r   Úress   &&  r   Útest_method_in_resultÚTestRoot.test_method_in_resultr   s+   € ò
	ô �4˜Q˜C¨Ô/ˆØ�z‰z˜VÔ#Ð#Ò#r   rf   N)
r"   r#   r$   r%   r&   r)   r'   r*   r(   zdf-sane)rU   rV   rW   rX   r2   r>   rG   rb   rx   ÚpytestÚmarkÚparametrizer~   rY   rZ   r[   s   @r   r	   r	      sI   ø‡ € òò:,ò )ò-ò.Cð4 ‡[�[×Ñ˜Xò (=ó >ñ$ó	>ö$r   r	   )Ú__doc__Únumpy.testingr   r   r€   r   r_   r   rq   Únumpyr   Úscipy.optimizer   r	   rf   r   r   Ú<module>r‡      s'   ðñ÷ 0Û ß AÛ å ÷o$ó o$r   