+
    /iC                        ^ RI t ^ RIHt ^ RIt^ RIHtHtHtHt ^ RI	t
^ RI	HtHtHtHtHtHtHtHt ^ RIHt ^ RIHtHtHtHt ^ RIHt ^ RIHtH t! ^]
P                  ! ]"4      PF                  ,          t$]! ]"4      PF                  t%]PL                  ]PN                  ]PP                  ]PR                  ]PT                  .t+]P0                  .t,]+],,           t-R	 t.R
 t/R t0R t1R t2R t3R t4]R 4       t5 ! R R4      t6 ! R R]64      t7 ! R R]64      t8R t9R t:R t; ! R R4      t<R t=R t>R t?R t@R  tAR! tB]P                  P                  R"^
]P                  3^d]P                  3.4      R# 4       tGR$ tH]P                  P                  R%. R3O4      R& 4       tI]P                  P                  R'. R3O4      R( 4       tJ]P                  P                  R%. R3O4      ]P                  P                  R)R*R+.4      R, 4       4       tKR- tL]P                  P                  R%. R3O4      ]P                  P                  R)R*R+.4      R. 4       4       tMR/ tNR0 tO]P                  P                  R']-4      R1 4       tP]P                  P                  R']PL                  ]PN                  ]PP                  ]PR                  .4      R2 4       tQR# )4    N)	lru_cache)assert_assert_allcloseassert_equalassert_array_equal)finfopowernanisclosesqrtexpsincos)optimize)	_zeros_pynewtonroot_scalarOptimizeResult)getfullargspec_no_self)	get_tests	functionsc                 >    V ^,          ^V ,          ,
          ^,
          #     xs   &]/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/optimize/tests/test_zeros.pyf1r   "   s    6AE>A    c                 "    ^V ,          ^,
          # r   r   r   s   &r   f1_1r"   &   s    q519r    c                 "    R ^ V ,          ,           #        @r   r   s   &r   f1_2r&   *   s    Q;r    c                 B    \        V 4      \        V 4      \        V 4      3# N)r   r"   r&   r   s   &r   f1_and_p_and_ppr)   .   s    a5$q'47""r    c                 8    \        V 4      \        V 4      ,
          # r(   r   r   r   s   &r   f2r,   3       q6CF?r    c                 8    \        V 4      \        V 4      ,           # r(   )r   r   r   s   &r   f2_1r/   7   r-   r    c                 8    \        V 4      \        V 4      ,           # r(   r+   r   s   &r   f2_2r1   ;   r-   r    c                     V # r(   r   r   s   &r   f_lrucachedr3   @   s    Hr    c                      a  ] tR t^Et o ^]P
                  ! ]4      P                  ,          t^]P
                  ! ]4      P                  ,          t	RR lt
RR ltRR ltRtV tR# )TestScalarRootFindersNc           	        . pT;'       g    .  F7  pWq9  d   R RRRRR/P                  Ww4      pVP                  W,          4       K9  	  \        R/ VB pVP                  RRRR	/4       T;'       g    .  F  pW,          W&   K  	  VP                  R
4      p	VP                  RR4      p
 V! VRV
/VB w  rWV3#   \         d3    T	\
        P                  ! \        RR\
        P                  T4      T3u # i ; i)ax0bx1funcffull_outputTdispFrootargsr   )	getappenddictupdate	ExceptionzerosRootResultsr
   
_EVALUEERR)selftcmethodsig_args_keyssig_kwargs_keyskwargsmethod_argskmethod_kwargsr?   	func_argsrrrs   &&&&&,       r   _run_one_test#TestScalarRootFinders._run_one_testK   s   $$"$A{$T637;;AAru%	 % vmT65AB &&B&A!uM ' vvf~FF62&		VKIiI=IEAR< 	V**3B8H8H&QSUUU	Vs   +B; ;:C87C8c                X   \        V4      p\        VP                  '       * 4       \        VP                  4      p\        VP
                  4      V,
          pVP
                  RV p	. p
VR9   dA   VR9   d*   V
P                  R4       VR9   d   V
P                  R4       V P                  VR&   MV P                  VR&   V P                  VR&   V Uu. uF#  p\        V P                  ! W3RV	RV
/VB 4      NK%  	  ppT;'       g    . pV Uu. uF  q^,          P                  '       d   K  VNK!  	  ppV Uu. uF  qR,          R	,          V9  g   K  VNK  	  ppV Uu. uF  qR,          R	,          NK  	  pp\        \        V4      V.^ . .4       RV P                  RV P                  /pVP                  ! R/ VB  VR,          pVP                  RVR,          4      pV Uu. uF  q^,          P                  '       g   K  VNK!  	  ppV Uu. uF  q^,          P                  NK  	  ppV Uu. uF  q^ ,          NK  	  pp\!        VVV4       UUUu. uF?  w  ppp\#        VVVVR
7      '       d   K  VR,          R	,          V9  g   K5  V.V,           NKA  	  ppppV UUUUu. uF1  w  ppppVR,          ! V.VP                  R\%        4       4      O5!  NK3  	  ppppp\!        VV4       UUu. uF  w  ppV^ 8w  g   K  V.V,           NK  	  ppp\        V\        V4      .. ^ .4       V Uu. uF  pV^,          P&                  NK  	  ppV Uu. uF  pVNK  	  p p\        VV 4       R# u upi u upi u upi u upi u upi u upi u upi u upppi u uppppi u uppi u upi u upi )zRun test-cases using the specified method and the supplied signature.

Extract the arguments for the method call from the test case
dictionary using the supplied keys for the method's signature.Nfprimefprime2tolxtolrtolrM   rN   ID)r]   atolr<   r@   )secantr   halley)r   ra   )ra   rA   r   )_getfullargspecr   
kwonlyargslendefaultsr@   rC   r\   r]   listrV   	convergedr   rE   rB   r?   zipr   tuplerL   )!rJ   testsrL   name
known_failrO   sig	nDefaults	nRequiredrM   rN   rK   resultseltnotcvgdnotcvged_IDStolsr]   r_   cvgdapproxcorrectr7   cnotclosearootfulloutfvsfvresultmethod_from_result_expected_methods!   &&&&&,                           r   	run_testsTestScalarRootFinders.run_testsb   sv    f%CNN"#%	MI-	),11++&&x0:%#**95 IIF5M!YYF6N!YYF6N CHIBGB **7&37+7/57 8BG 	 I
  %%2
")B'3Q1A1A33'B")M'3WT]*-L33'M189#B9c,'6B@ 		64995fF|xxtF|,&;wa&*:*:w;)-.#a&++.%)*Tcq66T*/267D/I 9/I)!Q14d;; BZ7 QC#II/I 9
 -56,4(5!Wb #wu7rvvfeg67,4 	 6.1#x.@L.@72sB!GJRD3JJ.@LhH.Q8=DEW6fQi..WE)01A41'9?I CM9 <.*96LE1sl   )M*M/+M/7M4M4M9#M>M>N/NN3N
N#7N
.N?N-N"N'c                J    \        WR7      pV P                  ! WrV3RV/VB  R# )zmRun a collection of tests using the specified method.

The name is used to determine some optional arguments.
smoothnessrl   N)r   r   )rJ   
collectionrL   rk   r   rl   rO   rj   s   &&&&&&, r   run_collection$TestScalarRootFinders.run_collection   s&    
 *<udLzLVLr    r   )NNr(   )__name__
__module____qualname____firstlineno__npr   floatepsr\   r]   rV   r   r   __static_attributes____classdictcell____classdict__s   @r   r5   r5   E   sO      rxx"""Drxx"""DV.9:vM Mr    r5   c                     a  ] tR t^t o ]P
                  P                  R]4      ]P
                  P                  R]4      R 4       4       t	]P
                  P                  R]4      ]P
                  P                  R]4      R 4       4       t
]P
                  P                  R]4      ]P
                  P                  R]4      R 4       4       t]P
                  P                  R]4      R 4       t]P
                  P                  R]P                  ]P                  ]P                   .4      R 4       t]P
                  P                  R]4      R 4       tR	 tR
tV tR# )TestBracketMethodsrL   functionc           	     8   R \        ^4      rC\        W!P                  W4.VV P                  V P                  R7      pVP
                  '       g   Q h\        VP                  RV P                  V P                  R7       VP                  VP                  8X  g   Q hR#       ?)rL   bracketr8   r\   r]         ?r_   r]   N)	r   r   r   r\   r]   rg   r   r?   rL   rJ   rL   r   r7   r9   rT   s   &&&   r   test_basic_root_scalar)TestBracketMethods.test_basic_root_scalar   sp     4711&Q!YYTYY8{{{{$))$))Dxx6??***r    c           	         R \        ^4      rCV! W#W@P                  V P                  RR7      w  rVVP                  '       g   Q h\	        VRV P                  V P                  R7       R# )r   T)r\   r]   r=   r   r   N)r   r\   r]   rg   r   )rJ   rL   r   r7   r9   r?   rT   s   &&&    r   test_basic_individual(TestBracketMethods.test_basic_individual   sR     471aiidii%)+ {{{{c				Br    c           	     ^   R \        ^4      rC\        W!P                  \        P                  ! W4.4      W0P
                  V P                  R7      pVP                  '       g   Q h\        VP                  RV P
                  V P                  R7       VP                  VP                  8X  g   Q hR# r   )r   r   r   r   arrayr\   r]   rg   r   r?   rL   r   s   &&&   r   test_bracket_is_array(TestBracketMethods.test_bracket_is_array   sz     471 "! 0QYY!YY( {{{{$))$))Dxx6??***r    c                B    V P                  R WP                  ^R7       R# )apsr   N)r   r   )rJ   rL   s   &&r   test_aps_collection&TestBracketMethods.test_aps_collection   s    E6??qIr    c                v    V\         P                  8X  d   R 0M/ pV P                  RWP                  VR7       R# )zfun7.4chandrupatla)rl   N)rG   ridderr   r   )rJ   rL   rl   s   && r   test_chandrupatla_collection/TestBracketMethods.test_chandrupatla_collection   s6     $*U\\#9hZr
NFOO'1 	 	3r    c                n    R^r2V! \         W#RR7      w  rEVP                  '       g   Q h\        V^ 4       R# )   Tr=   NrA   )r3   rg   r   )rJ   rL   r7   r9   r?   rT   s   &&    r   test_lru_cached_individual-TestBracketMethods.test_lru_cached_individual   s3     11a={{{{a r    c           	         \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! R R^ RR7       RRR4       R#   + '       g   i     R# ; i)zmaxiter must be >= 0matchc                 "    V ^,          ^,
          # r   r   r   s   &r   <lambda>2TestBracketMethods.test_gh_22934.<locals>.<lambda>       1a4!8r    maxiterNrA   )pytestraises
ValueErrorrG   brentqrJ   s   &r   test_gh_22934 TestBracketMethods.test_gh_22934   s7    ]]:-CDDLL+RB? EDDDs   AA	r   N)r   r   r   r   r   markparametrizebracket_methodststutils_functionsr   r   r   r   rG   bisectr   toms748r   r   r   r   r   r   s   @r   r   r      sW    [[X7[[Z);<
+ = 8
+ [[X7[[Z);<	C = 8	C [[X7[[Z);<+ = 8+ [[X7J 8J [[Xell(-(7 8383
 [[X7! 8!@ @r    r   c                   *  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R tR tR tR t]P,                  P/                  R]! 4       RR/.4      R 4       t]P,                  P/                  RRR.4      R 4       tR tRtV tR# )
TestNewtonc           	     |    R .pVRR.,          pR F'  pV P                  V\        P                  R^VR7       K)  	  R# )	aps.13.00z	aps.12.05	aps.12.17r   r   rl   Nr   complexr   rG   r   rJ   rl   r   s   &  r   test_newton_collections"TestNewton.test_newton_collections   sE    !]
{K00
,J
ELL(+,   E -r    c           	     h    . ROpR F'  pV P                  V\        P                  R^VR7       K)  	  R# )	aps.12.06ra   r   N)r   z	aps.12.07z	aps.12.08z	aps.12.09z	aps.12.10z	aps.12.11z	aps.12.12z	aps.12.13z	aps.12.14z	aps.12.15z	aps.12.16r   z	aps.12.18r   r   r   r   s   &  r   test_halley_collections"TestNewton.test_halley_collections   s8    0
 -J
ELL(+,   E -r    c           	        \         \        \        3\        \        \
        33 F  w  rp\        P                  ! V^RR7      p\        V! V4      ^ RR7       \        P                  ! V^^RR7      p\        V! V4      ^ RR7       \        P                  ! V^VRR7      p\        V! V4      ^ RR7       \        P                  ! V^W#RR7      p\        V! V4      ^ RR7       K  	  R# )   ư>r[   r_   )r:   r[   )rY   r[   )rY   rZ   r[   N)	r   r"   r&   r,   r/   r1   rG   r   r   )rJ   r<   f_1f_2r   s   &    r   test_newtonTestNewton.test_newton   s    t,r4.>?KACQt,AAaD!$/QaT2AAaD!$/Q#48AAaD!$/Q#EAAaD!$/ @r    c           	     l   \         \        \        3\        \        \
        33 F4  w  rp\        VR^VRR7      p\        V! VP                  4      ^ RR7       K6  	  \         \        \        3\        \        \
        33 F3  w  rp\        VR^RR7      p\        V! VP                  4      ^ RR7       K5  	  R# )z#Invoke newton through root_scalar()r   r   )rL   r8   rY   r\   r   rL   r8   r\   N	r   r"   r&   r,   r/   r1   r   r   r?   rJ   r<   r   r   rT   s   &    r   test_newton_by_nameTestNewton.test_newton_by_name  s    t,r4.>?KACAh1StLAAaffIqt4 @  t,r4.>?KACAh14@AAaffIqt4 @r    c           	        \         \        \        3\        \        \
        33 Fb  w  rp\        VR^^RR7      p\        V! VP                  4      ^ RR7       \        VR^^RR7      p\        V! VP                  4      ^ RR7       Kd  	  \         \        \        3\        \        \
        33 F3  w  rp\        VR^RR7      p\        V! VP                  4      ^ RR7       K5  	  R# )z#Invoke secant through root_scalar()r`   r   rL   r8   r:   r\   r   r   Nr   r   s   &    r   test_secant_by_nameTestNewton.test_secant_by_name  s    t,r4.>?KACAh1FAAaffIqt4Ah1FAAaffIqt4	 @
  t,r4.>?KACAh14@AAaffIqt4 @r    c           
         \         \        \        3\        \        \
        33 F4  w  rp\        VR^W#RR7      p\        V! VP                  4      ^ RR7       K6  	  R# )z#Invoke halley through root_scalar()ra   r   )rL   r8   rY   rZ   r\   r   Nr   r   s   &    r   test_halley_by_nameTestNewton.test_halley_by_name  sN    t,r4.>?KACAh1#&$@AAaffIqt4 @r    c           
     p   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\        ^RR7       RRR4       R#   + '       g   i     LY; i  + '       g   i     R# ; i)z$fprime2 must be specified for halleyr   ra   r   )rL   rY   r8   r\   Nz#fprime must be specified for halley)rL   rZ   r8   r\   )r   r   r   r   r   r"   r&   )rJ   messages   & r   test_root_scalar_fail TestNewton.test_root_scalar_fail!  sp    8]]:W558DQTJ 67]]:W558TadK 65 65 655s   B.B$B!	$B5	c                   R pR pR p\         P                  ! . RO4      p\         P                  ! \        ^
4      4      R,           R,          pWERR^
R3pR.^
,          p\        P
                  ! WW&4      pRp	\        W4       \        P
                  ! WW&VR	7      p\        W4       \        P
                  ! WVR
7      p\        W4       R# )ztest newton with arrayc                     V^ ,          W^,          ,          ,           pV^,          V^,          \         P                  ! W!^,          ,          4      R,
          ,          ,
          W!^,          ,          ,
          V ,
          # )r   r   r   r   r   r7   r9   s   &* r   r   (TestNewton.test_array_newton.<locals>.f1,  sQ    !qQ4xAQ4!A$"&&qT"2S"899A!HDqHHr    c                    V^,          V^,          ,          pV^,          ) \         P                  ! V^ ,          V^,          ,          W,          ,           4      ,          V,          V^,          V^,          ,          ,
          ^,
          # r   r   r   s   &* r   r"   *TestNewton.test_array_newton.<locals>.f1_10  s[    !qtAaD5266!A$1+"566:QqTAaD[H1LLr    c                     V^,          V^,          ,          pV^,          ) \         P                  ! V^ ,          V^,          ,          W,          ,           4      ,          V^,          ,          # r   r   r   s   &* r   r&   *TestNewton.test_array_newton.<locals>.f1_24  sI    !qtAaD5266!A$1+"566A==r    r   g      @&.>Mbp?n2d?)rZ   r@   N)
g4O@gNk@g]0J@g]Qݚt@g~EO5@g$J ?g~5,@gXCڭ@gͮ9@@gӍ@)
gԩ˰@g9~4b'@gaq(@g0p@gk"z?g4se?gU+F@gwQu%@gd6)@g)i!@)r   r   r   rangerG   r   r   )
rJ   r   r"   r&   a0a1r@   r8   r   
x_expecteds
   &         r   test_array_newtonTestNewton.test_array_newton)  s    	I	M	> XX 
  ffU2Y#%,ub'2URZLL,

 	&LLT:&LLd+&r    c                d   R  pR p\         P                  ! ^R4      p\        P                  ! WVR7      p\	        V! V4      R4       \         P
                  ! ^4      p\        P                  ! WVR7      p\	        V! V4      R4       \        P                  ! W4      p\	        V! V4      R4       R# )c                 "    V ^,           R,           # )r                 ?r   r   s   &r   r<   /TestNewton.test_array_newton_complex.<locals>.fQ  s    q58Or    c                     R # r   r   r   s   &r   rY   4TestNewton.test_array_newton_complex.<locals>.fprimeT  s    r    r  )rY           N)r   fullrG   r   r   ones)rJ   r<   rY   tr   s   &    r   test_array_newton_complex$TestNewton.test_array_newton_complexP  s    		 GGArNLLf-!b! GGAJLLf-!b!LL!b!r    c                    \         P                  ! R R^.\        P                  ! ^^.4      .R7      p\	        VR4       R# )z8test secant doesn't continue to iterate zero derivativesc                 .    W ,          V^ ,          ,
          # r   r   r   r7   s   &*r   r   >TestNewton.test_array_secant_active_zero_der.<locals>.<lambda>e  s    qsQqTzr    gˡE}@)r8   r@   N)f~@g      @)rG   r   r   r   r   rJ   r   s   & r   !test_array_secant_active_zero_der,TestNewton.test_array_secant_active_zero_derc  s7    LL1uaj!xxR12434r    c                    \         P                  ! R  R.^,          RR.3R7      p\        VR4       \         P                  ! R ^.^,          ^^.3R7      p\        VR4       R# )c                      W^,          ,
          # r   r   yzs   &&r   r   7TestNewton.test_array_newton_integers.<locals>.<lambda>k  
    aq&jr          @g      .@g      1@r  c                      W^,          ,
          # r   r   r#  s   &&r   r   r&  o  r'  r    N)gNO@r  )rG   r   r   r  s   & r   test_array_newton_integers%TestNewton.test_array_newton_integersi  sY    LL03%!) $d|o/ABLL01#'"bLABr    c           	     *   \         P                  ! \        4      ;_uu_ 4        \        P                  ! R  RR.R 4       RRR4       \         P                  ! \        4      ;_uu_ 4        \        P                  ! R RR.R RR7      p\        VP                  ^ 4       VP                  P                  4       '       g   Q hVP                  P                  4       '       d   Q h RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)c                 "    V ^,          ^,
          # r   r   r$  s   &r   r   @TestNewton.test_array_newton_zero_der_failures.<locals>.<lambda>u  r   r    r  c                     ^V ,          # r   r   r.  s   &r   r   r/  u  s    Qr    Nc                 "    V ^,          ^,
          # r   r   r.  s   &r   r   r/  x  s    QTAXr    c                     ^V ,          # r   r   r.  s   &r   r   r/  y  s    QqSr    Tr   )r   warnsRuntimeWarningrG   r   r   r?   zero_derallrg   any)rJ   rp   s   & r   #test_array_newton_zero_der_failures.TestNewton.test_array_newton_zero_der_failuresr  s    \\.))LL+b"XG * \\.))ll#5Bx#0dDGGLL!,##''))))((,,..... *) *) *))s   C.*A6D!D.C>	D	c                   R  pR pR pR p\        VR^VR7      p\        VR^RR7      p\        VP                  VP                  RR7       \        ^VP                  ,          VP                  4       \        VR	^W#R
7      p\        VR	^RR7      p\        VP                  VP                  RR7       \        ^VP                  ,          VP                  4       R# )c                 >    V ^,          ^V ,          ,
          ^,
          # r   r   r   s   &r   r   +TestNewton.test_newton_combined.<locals>.f1  s    6AE>A%%r    c                 "    ^V ,          ^,
          # r   r   r   s   &r   r"   -TestNewton.test_newton_combined.<locals>.f1_1  s    q519r    c                 "    R ^ V ,          ,           # r$   r   r   s   &r   r&   -TestNewton.test_newton_combined.<locals>.f1_2  s    Q;r    c                 `    V ^,          ^V ,          ,
          ^,
          ^V ,          ^,
          R3# r   r%   r   r   s   &r   r)   8TestNewton.test_newton_combined.<locals>.f1_and_p_and_pp  s'    a4!A#:a<1Q++r    r   )rL   r8   rY   T:0yE>r   ra   )rL   r8   rY   rZ   )rL   r8   rZ   N)r   r   r?   r   function_calls)rJ   r   r"   r&   r)   sol0sols   &      r   test_newton_combinedTestNewton.test_newton_combined~  s    	&			, 2h1TB/(qN		388$7Qs)))4+>+>?2h1TP/(q$O		388$7Qs)))4+>+>?r    c           
        ^p. ROp\        ^4       EF  pRRRR/pR\        .R\        ..RV  F	  w  rgWuV&   K  	  \        P                  ! \
        V3RR	/VB w  r\        V	P                  4       \        WP                  4       \        V	P                  V	P                  3W4,          4       V^ 8X  d&   V	P                  V	P                  ^,           8:  g   Q hM.\        V	P                  V^,           V	P                  ,          4       V	P                  ^,
          p
\        P                  ! \
        V3R
V
RR	/VB w  r\        V	P                  '       * 4       \        WP                  4       \        V	P                  V
4       V^8X  g   EKz  RV
 R2p\        P                  ! \        VR7      ;_uu_ 4        \        P                  ! \
        V3R
V
RR/VB w  rRRR4       EK  	  R#   + '       g   i     EK  ; i)r   r[   r   r=   TrY   rZ   Nr>   Fr   zFailed to converge after z iterations, value is .*r   ))      )   
   )r   	   )r  r"   r&   rG   r   r   r   rg   r   r?   
iterationsrE  r   r   RuntimeError)rJ   capsysr8   expected_countsderivsrO   rQ   vr   rT   itersmsgs   &&          r   test_newton_full_output"TestNewton.test_newton_full_output  s   
 3AhFT=$9F"D)It+<=gvFq	 G <<B=U=f=DAAKK FF#!,,(8(89?;RS{''1<<!+;;;;Q--
all/JK LL1$E<<BLLELVLDAO$FF#u-{ 2%8PQ]]<s;; <<BSSDSFSDA <;3 2 <;;s   6#G((G:c           	     t   R  pR p\         P                  ! \        4      ;_uu_ 4        \        P                  ! VRVRR7       RRR4       \         P
                  ! \        RR7      ;_uu_ 4        \        P                  ! VRV4       RRR4       R#   + '       g   i     LW; i  + '       g   i     R# ; i)c                 "    V ^,          R,
          # rB  r   r   s   &r   r;   0TestNewton.test_deriv_zero_warning.<locals>.func  s    6C<r    c                     ^V ,          # r   r   r   s   &r   dfunc1TestNewton.test_deriv_zero_warning.<locals>.dfunc  s    q5Lr    r  Fr>   NzDerivative was zeror   )r   r3  r4  rG   r   r   rQ  )rJ   r;   r^  s   &  r   test_deriv_zero_warning"TestNewton.test_deriv_zero_warning  sp    	 	\\.))LLsE6 *]]</DEELLsE* FE *)EEEs   B0B&B#	&B7	c                    \         P                  ! R ^.4      pVP                  4       p\        \         P                  V\         P
                  4       \        W4       R# )皙?N)r   r   copyr   r   r   r   )rJ   r8   x0_copys   &  r   test_newton_does_not_modify_x0)TestNewton.test_newton_does_not_modify_x0  s;    XXsAh'')rvvr266"2'r    c                6   R  p\        VR^RR7      p\        VR^^RR7      p\        V^^RRR7      ^,          p\        V! VP                  4      ^ RR7       VP                  P                  \        4       8X  g   Q h\        V! VP                  4      ^ RR7       VP                  P                  \        4       8X  g   Q h\        V! VP                  4      ^ RR7       VP                  P                  \        4       8X  g   Q hVP                  VP                  u;8X  d   VP                  8w  g   Q h Q hVP                  VP                  ^,
          u;8X  d>   VP                  u;8X  d,   VP                  u;8w  d   VP                  ^,          8X  g   Q h Q hR	# )
c                 T    \         P                  ! V 4      '       g   Q h\        V 4      # r(   )r   isscalarr   r   s   &r   r<   +TestNewton.test_gh17570_defaults.<locals>.f  s    ;;q>>!>a5Lr    r   r   r   r`   r   T)r8   r:   r[   r=   r   N)r   r   r   r?   shaperi   rP  rE  )rJ   r<   res_newton_defaultres_secant_default
res_secants   &    r   test_gh17570_defaults TestNewton.test_gh17570_defaults  s   	 )8M(8a.24 A!tFqI
 	,112ADA!&&,,777,112ADA!&&,,777*//*AD9$$/// #''??1%001 	2 1 	2 1 #--%44q87((7 &007 &44Q6	7 	8 7 	8 7r    rO   rL   r   c                    R  p\         P                  ! V3R^RR/VB pVP                  '       g   Q h\        VP                  ^4       R# )c                 D    V^8X  g   Q hV^8X  g   Q hW,          V,
          # r   r   r   s   &&&r   r<   'TestNewton.test_args_gh19090.<locals>.f  s$    6M66M6FQJr    r8   r@   N)r   r   )r   r   rg   r   r?   )rJ   rO   r<   ress   &&  r   test_args_gh19090TestNewton.test_args_gh19090  sD    	 
 ""1BBB6B}}}}!$r    r`   c                "   R  p\         P                  ! V^VR7      pVP                  '       g   Q h\        \	        VP
                  4      R4       VP
                  P                  \        P                  ! \        P                  4      8X  g   Q hR# )c                 "    V R,          ^,
          # )r   r   r   r   s   &r   r<   )TestNewton.test_int_x0_gh19280.<locals>.f  s    b519r    )r8   rL   Ng;f?)	r   r   rg   r   absr?   dtyper   float64)rJ   rL   r<   rv  s   &&  r   test_int_x0_gh19280TestNewton.test_int_x0_gh19280  s`    
	 ""16:}}}}CHHw/xx~~"**!5555r    c           	     8   \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! \
        ^R	R7       RRR4       \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! \
        ^RR
R7       RRR4       \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! \
        ^^R7       RRR4       R#   + '       g   i     L; i  + '       g   i     Lo; i  + '       g   i     R# ; i)ztol too smallr   r   r   Nzmaxiter must be greater than 0)r[   r   zx1 and x0 must be different)r:   ưi)r   r   r   rG   r   r   r   s   &r   test_newton_special_parameters)TestNewton.test_newton_special_parameters  s     ]]:_==LLQE* > ]]:-MNNLLQD#6 O ]]:-JLLLLQ1% ML >= ON MLLs#   C"/C5:D"C2	5D	D	r   N)r   r   r   r   r   r   r   r   r   r   r   r	  r  r  r*  r8  rH  rX  ra  rg  rq  r   r   r   rD   rw  r  r  r   r   r   s   @r   r   r      s     EE	05	55L%'N"&5C
/@*"TH+( 8D [[X80D'EF% G% [[X(';<6 =6
& 
&r    r   c            	         a R oV3R lp \         P                  \         P                  .p\        ;r#V F+  pV! V RRW#R7      p\	        SWRVRVP
                   2R7       K-  	  R# )rd  c                    < V S,
          # r(   r   r   r?   s   &r   r<   test_gh_5555.<locals>.f      4xr        cAr\   r]   zmethod )r_   r]   err_msgN    ח)rG   r   r   TOLr   r   )r<   methodsr\   r]   rL   rv  r?   s         @r   test_gh_5555r    s`    D ||U\\*GDQc8c4")&//): ;	= r    c            	          R  p Rp^\         ,          p\        P                  \        P                  .pV F  pV! V ^ ^WR7      p\	        RWQVR7       K  	  R# )c                 &    V R 8  d   R# V R,
          # )r   333333?gr   r   s   &r   r<   test_gh_5557.<locals>.f(  s    s7Ks7Nr    gRQ?r  r  r   N)
_FLOAT_EPSrG   r   brenthr   )r<   r_   r]   r  rL   rv  s         r   test_gh_5557r    sO     Dz>D||U\\*GQ143S$7 r    c                     a Rp RpW3 F[  w  r#p\         P                  ! V4      o\        P                  \        P                  3 F  pV! V3R lW#4      p\        WF4       K  	  K]  	  R# )      |@c                 >   < \         P                  ! V 4      S,
          # r(   r   )r   rx   s   &r   r   9test_brent_underflow_in_root_bracketing.<locals>.<lambda>A  s    266!9Q;r    N)g      |g     ug      y)g     u@r  g      y@)r   r   rG   r  r   r   )underflow_scenariooverflow_scenarior7   r9   r?   rL   rv  rx   s          @r   'test_brent_underflow_in_root_bracketingr  6  s[    
 2-)=
dFF4L||U\\2F.5CD& 3 >r    c                   Z   a  ] tR tRt o ]P
                  ! R^,^.^ RR7      tR tR tRt	V t
R# )	TestRootResultsiE  r   r   )r?   rP  rE  flagrL   c                H    R p\        \        V P                  4      V4       R# )z      converged: True
           flag: converged
 function_calls: 46
     iterations: 44
           root: 1.0
         method: newtonN)r   reprrT   )rJ   expected_reprs   & r   	test_reprTestRootResults.test_reprI  s    I 	T$&&\=1r    c                J    \        V P                  \        4      '       g   Q hR # r(   )
isinstancerT   r   r   s   &r   	test_typeTestRootResults.test_typeO  s    $&&.1111r    r   N)r   r   r   r   rG   rH   rT   r  r  r   r   r   s   @r   r  r  E  s/     sr"1!)	+A22 2r    r  c            	        R p R pR p\        RR4      pR
p\        P                  ! WWAVRR7      p\        V ! V.VO5!  ^ RR7       V.^
,          pR
p\        P                  ! WWAVRR7      p\        V ! V.VO5!  ^ RR7       R	# )z&Test Halley's works with complex rootsc                 v    V^ ,          V ^,          ,          V^,          V ,          ,           V^,          ,           # r  r   r  s   &*r   r<   test_complex_halley.<locals>.fU  s*    tad{QqTAX%!,,r    c                 L    ^V^ ,          ,          V ,          V^,          ,           # r   r   r  s   &*r   r    test_complex_halley.<locals>.f_1X  s    1Q4x!|ad""r    c                 t    ^V^ ,          ,          p \        V 4      pV.V,          #   \         d    Tu # i ; ir   )rd   	TypeError)r   r7   retvalsizes   &*  r   r    test_complex_halley.<locals>.f_2[  sA    QqT	#q6D 8d?"  	M	s   ' 77r   r%   r   )r@   rY   rZ   r[   r   N)r%   g      @r(  )r   rG   r   r   )r<   r   r   r%  coeffsr$  s         r   test_complex_halleyr  S  s    -## 	SAFQCTJAAaM&M140	
bAFQCTJAAaM&M140r    c                    \         P                  ! \        4      P                  R,          pRV,
          RV,           ,          p\        P
                  ! 4       ;_uu_ 4        \        P                  ! RR\        4       \        P                  ! R V.^
,          R7      pRRR4       \        X^d.^
,          4       Rp\        P
                  ! 4       ;_uu_ 4        \        P                  ! RR	\        4       \        P                  ! R
 VRR7      pRRR4       \        V^4       \        P                  ! \        R	R7      ;_uu_ 4        \        P                  ! R VRR7      pRRR4       Rp\        P
                  ! 4       ;_uu_ 4        \        P                  ! RR	\        4       \        P                  ! R VRR7      pRRR4       \        VR4       \        P                  ! \        R	R7      ;_uu_ 4        \        P                  ! R VRR7      pRRR4       R#   + '       g   i     EL; i  + '       g   i     EL+; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)zBTest secant method with a non-zero dp, but an infinite newton stepgQ?g      i@r%   ignorezRMS ofc                 "    V R ,
          ^,          # )g      Y@r   r.  s   &r   r   %test_zero_der_nz_dp.<locals>.<lambda>|  s    AI>r    r8   NTolerance ofc                 "    V R ,
          ^,          # r  r   r.  s   &r   r   r        AG>r    F)r8   r>   r   c                 "    V R ,
          ^,          # r  r   r.  s   &r   r   r    r  r    Tc                 "    V R ,           ^,          # r  r   r.  s   &r   r   r    r  r    c                 "    V R ,           ^,          # r  r   r.  s   &r   r   r    r  r    g.ЗK.?g.ЗK.rA   )r   r   r   r   warningscatch_warningsfilterwarningsr4  rG   r   r   r   r   rQ  )rR  dxp0r   s   &   r   test_zero_der_nz_dpr  o  s    
%			$B "*r	"B		 	 	"	"(NCLL1rdRi@ 
# Aurz"	$B		 	 	"	"..ILL1buE 
# Aq	|>	:	:LL1btD 
;	%B		 	 	"	"..ILL1buE 
# Ar	|>	:	:LL1btD 
;	:# 
#	"	" 
#	"	" 
;	: 
#	" 
;	:	:s<    >H7H2I
7I9I,H/	2I	I	I)	,I=	c            
       a Rp RoRpRpRpW,          V ,          V,          pV3R lp\         P                  ! \        4      ;_uu_ 4        \        P                  ! V. RO^W@.RR	7      pVP
                  P                  4       '       d   Q h R
R
R
4       \         P                  ! \        4      ;_uu_ 4        \        P                  ! VR.^,          ^W@.RR	7      pR
R
R
4       R
#   + '       g   i     La; i  + '       g   i     R
# ; i)z(Test that array newton fails as expectedrd  ga2U0*#?g@g\mJA?gCl@c           	         < ^\         P                  ! V 4      ,          ^\         P                  ! SR,          V,          RV,          \         P                  ! V 4      ,          ,           4      ,          ,           # )r   g@gGz@)r   r   log10)darcy_frictionredia	roughnesss   &&&r   colebrook_eqn1test_array_newton_failures.<locals>.colebrook_eqn  s[    BGGN++BHHY_s2!BY)@@A B BB 	Cr    {Gz?T)r8   r   r@   r=   N)r  g?gvÖ?g333333?)	r   r3  r4  rG   r   rg   r6  r   rQ  )diameterrhomuureynolds_numberr  r~   r  s          @r   test_array_newton_failuresr    s    
 HI
C	BAg(2-OC 
n	%	%7!,$
 ##''))))) 
& 
|	$	$tfqj!!,$
 
%	$ 
&	% 
%	$	$s   
AC%6%C8%C5	8D		c                    R p \         P                  ! V ^ R7      p\        V^ \         P                  \         P                  R7       \         P                  ! V ^ .^
,          R7      p\        V^ \         P                  \         P                  R7       R pR p\         P                  ! V ^ VR7      p\        V^ \         P                  \         P                  R7       \         P                  ! V ^ VVR7      p\        V^ \         P                  \         P                  R7       \         P                  ! V ^ .^
,          VR7      p\        V^ \         P                  \         P                  R7       \         P                  ! V ^ .^
,          VVR7      p\        V^ \         P                  \         P                  R7       \         P                  ! V RVR7      p\        V^ \         P                  \         P                  R7       \         P                  ! V R.^
,          VR7      p\        V^ \         P                  \         P                  R7       R	# )
z@Test that Newton or Halley don't warn if zero derivative at rootc                 0    V ^,          V ^,          ,
          # r   r   r   s   &r   f_zeroder_root9test_gh8904_zeroder_at_root_fails.<locals>.f_zeroder_root  s    !tad{r    r  r   c                 >    ^V ^,          ,          ^V ,          ,
          # r   r   r   s   &r   fder/test_gh8904_zeroder_at_root_fails.<locals>.fder  s    1a4x!a%r    c                 "    ^V ,          ^,
          # )rK  r   r   s   &r   fder20test_gh8904_zeroder_at_root_fails.<locals>.fder2  s    sQwr    )r8   rY   )r8   rY   rZ   r   N)rG   r   r   _xtol_rtol)r  rT   r  r  s       r   !test_gh8904_zeroder_at_root_failsr    su    	^*AAqu{{=^B/AAqu{{=  	^$7AAqu{{=^$"	$AAqu{{=^Bt<AAqu{{=^Bt"	$AAqu{{= 	^D9AAqu{{=^b>AAqu{{=r    c                    a ^	oV3R lp V3R lpV3R lpRp\        WVRR7      w  rEVP                  '       g   Q h\        WWRR7      w  rEVP                  '       g   Q hR# )	zvTest that Halley's method realizes that the 2nd order adjustment
is too big and drops off to the 1st order adjustment.c                 Z   < \        V R S,          4      \        SR S,          4      ,
          # r  r	   r   ns   &r   r<   test_gh_8881.<locals>.f  s"    QAq#a%00r    c                 F   < \        V R S,
          S,          4      S,          # r  r  r  s   &r   fptest_gh_8881.<locals>.fp  s    QQ	"1$$r    c                    < \        V R ^S,          ,
          S,          4      R S,          ,          R S,
          ,          S,          # r  r  r  s   &r   fpptest_gh_8881.<locals>.fpp  s3    QQqS!$A.#a%8::r    rd  T)rY   r=   rY   rZ   r=   N)r   rg   )r<   r  r  r8   rtrT   r  s         @r   test_gh_8881r    s`     	
A1%; 
B 16EB;;;; 1dCEB;;;;r    c            
     (   R p R pR p\         P                  ! R	.\         P                  R7      p\        WWRR7      w  rEVP                  '       g   Q h\         P                  ! R	R
.\         P                  R7      p\
        P                  ! \        4      ;_uu_ 4        \        P                  ! WWRR7      pRRR4       R p\        P                  ! WWRR7      pVP                  P                  4       '       g   Q hR#   + '       g   i     LP; i)zS
Test that shape is preserved for array inputs even if fprime or fprime2 is
scalar
c                     V ^,          # r   r   r   s   &r   r<   ,test_gh_9608_preserve_array_shape.<locals>.f   s    !tr    c                     ^V ,          # r   r   r   s   &r   r  -test_gh_9608_preserve_array_shape.<locals>.fp      1ur    c                     ^# r   r   r   s   &r   r  .test_gh_9608_preserve_array_shape.<locals>.fpp  s    r    r}  Tr  Nc                 x    \         P                  ! \         P                  ! V 4      ^\         P                  R7      # )r   r  )r   r  rm  float32r   s   &r   	fpp_array4test_gh_9608_preserve_array_shape.<locals>.fpp_array  s!    wwrxx{ARZZ88r    r   )
r   r   r  r   rg   r   r   
IndexErrorrG   r6  )	r<   r  r  r8   r  rT   x0_arrayr~   r  s	            r   !test_gh_9608_preserve_array_shaper    s    
 
2$bjj	)B1dCEB;;;;xxR

3H	z	"	"T
 
#
9 \\	BtF !!!! 
#	"s   DD	z maximum_iterations,flag_expectedc                >   \         P                  ! R R^RRRV RRR7	      pV^,          P                  V8X  g   Q hV\         P                  8X  d   V^,          P                  V 8X  g   Q hR# V\         P
                  8X  d   V^,          P                  V 8  g   Q hR# R# )	zQ
Test that if the maximum iterations is exceeded that the flag is not
converged.
c                 Z    R V ,          R,
          V ,          R,           V ,          R,
          # )g333333?gffffff@g333333@g      @r   r   s   &r   r   6test_gh9254_flag_if_maxiter_exceeded.<locals>.<lambda>&  s    CECK?S(!+c1r    r   TF)r=   r>   Nir   )rG   r   r  CONVERRrP  	CONVERGED)maximum_iterationsflag_expectedr~   s   && r   $test_gh9254_flag_if_maxiter_exceededr    s     \\1RT4!3u&F !9>>]***%ay##'9999	%//	)ay##&8888 
*r    c            	        R p R p\         P                  ! \        4      ;_uu_ 4        \        P                  ! V RVRR7       RRR4       \         P
                  ! \        RR7      ;_uu_ 4        \        P                  ! V RV4       RRR4       \        P                  ! V \        R	R	4      V4      p\        V\        R
R4      4       R#   + '       g   i     L; i  + '       g   i     L]; i)zBTest that if disp is true then zero derivative raises RuntimeErrorc                      W ,          ^,           # r   r   r   s   &r   r<   /test_gh9551_raise_error_if_disp_true.<locals>.f5  s    sQwr    c                     ^V ,          # r   r   r   s   &r   f_p1test_gh9551_raise_error_if_disp_true.<locals>.f_p8  s    s
r    r   Fr`  NzY^Derivative was zero\. Failed to converge after \d+ iterations, value is [+-]?\d*\.\d+\.$r   g      $@r  )	r   r3  r4  rG   r   r   rQ  r   r   )r<   r  r?   s      r   $test_gh9551_raise_error_if_disp_truer  2  s     
n	%	%QSu- 
&	/
0 
0 	QS!	
0
 <<74.4DD'#s+, 
&	%
0 
0s   C0CC	C.	solver_namec                     R  p\        \        V 4      p\        P                  ! \        RR7      ;_uu_ 4        V! V^ ^4       RRR4       R#   + '       g   i     R# ; i)c                 "    \         P                  # r(   )r   r
   r   s   &r   r<   test_gh3089_8394.<locals>.fK  s    vvr    zThe function value at x...r   N)getattrrG   r   r   r   )r  r<   solvers   &  r   test_gh3089_8394r  F  sB    
 UK(F	z)E	F	Fq!Q 
G	F	F	Fs   AA	rL   c                 .  a V3R  lo^ Sn         \        SRV R7      pVP                  RJ g   Q hVP                  P	                  R4      '       g   Q hVP
                  SP                   8X  g   Q h\        VP                  4      VP                  9   g   Q hR# )c                 V   < S;P                   ^,          un         \        P                  # r  )_countr   r
   r   r<   s   &r   r<   test_gh18171.<locals>.fY  s    	Avvr    )r   rL   FzThe function value at xN)r   r   )r  r   rg   r  
startswithrE  strr?   )rL   rv  r<   s   & @r   test_gh18171r#  S  s     AH
a
7C==E!!!8889999)))sxx=CHH$$$r    rs_interfaceTFc                   a V'       d   R  M\        \        V 4      pV3R lo^ Sn        V! S^ ^
RR7      pV'       d    VP                  SP                  8X  g   Q hR# V^,          P                  SP                  8X  g   Q hR# )c                     \        WV3R 7      # )r   r   r<   r7   r9   rO   s   &&&,r   r   %test_function_calls.<locals>.<lambda>k      QA)Gr    c                 V   < S;P                   ^,          un         V ^,          ^,
          # r  )callsr  s   &r   r<   test_function_calls.<locals>.fn  s    	1!taxr    Tr   N)r  rG   r-  rE  )r  r$  r  rv  r<   s   &&  @r   test_function_callsr/  e  sr      H#*5+#>  AG
Art
,C!!QWW,,,1v$$///r    c            
        R p \         P                  ! \        RR7      ;_uu_ 4        \        V RRRR7      pRRR4       XP                  '       d   Q hVP
                  R8X  g   Q h\         P                  ! \        RR7      ;_uu_ 4        \        V RRR	R
R7      ^,          pRRR4       VP                  '       d   Q hVP
                  R8X  g   Q hR#   + '       g   i     L; i  + '       g   i     LL; i)zDTest that zero slope with secant method results in a converged=Falsec                 Z    V \         P                  ! V ) V ,          4      ,          R ,
          # )gQ?r   r   s   &r   lhs*test_gh_14486_converged_false.<locals>.lhs}  s     2661"Q$<$&&r    r  r   r`   r   )rL   r8   r:   Nzconvergence errorFT)r8   r:   r>   r=   g333333ÿ)r   r3  r4  r   rg   r  r   )r2  rv  s     r   test_gh_14486_converged_falser4  {  s    ' 
nN	;	;#h5SA 
<}}}88****	nN	;	;SUsDI!L 
<}}}88**** 
<	;
 
<	;s   CC'C$	'C7	c           	         V'       d   R  M\        \        V 4      pR p\        P                  ! \        RR7      ;_uu_ 4        V! VRRRR7       RRR4       V! VRRRR7      pV'       d   TMV^,          pVP
                  '       g   Q h\        VP                  ^ RR	7       V! VR\        R
4      RR7      pV'       d   TMV^,          pVP
                  '       g   Q h\        VP                  ^ RR	7       R#   + '       g   i     L; i)c                     \        WV3R 7      # r'  r(  r)  s   &&&,r   r   test_gh5584.<locals>.<lambda>  r+  r    c                     R V ,          # )gN~hr   r   s   &r   r<   test_gh5584.<locals>.f  s    axr    z...must have different signsr   g?Tr   NrD  r   z-0.0g      gٿ)	r  rG   r   r   r   rg   r   r?   r   )r  r$  r  r<   rv  s   &&   r   test_gh5584r:    s      H#*5+#>  
z)G	H	Hq$$/ 
I D#4
0C#3q6C====CHHad+ D%-T
:C#3q6C====CHHad+ 
I	Hs   C99D		c            
         R  p Rp\         P                  ! \        4      P                  p\        P
                  ! V RRV^V,          R7      pV ! V4      p\        P
                  ! V RRV^V,          R7      pV ! V4      pWF8  g   Q hRV^,          R RVR R2p\        P                  ! \        VR	7      ;_uu_ 4        \        P
                  ! V RRW^,          R7       R
R
R
4       R
#   + '       g   i     R
# ; i)c                 >    V ^,          ^V ,          ,
          ^,
          # r   r   r   s   &r   r<   test_gh13407.<locals>.f  s    !taczA~r    gYng|=g    _Br  zrtol too small \(gz < z\)r   N)	r   r   r   r   rG   r   r   r   r   )r<   r\   r   r:   r   x4f4r   s           r   test_gh13407rA    s     D
((5/

C	q%Dqu	=B	
2B	q%Dqu	=B	
2B7N7 #3q5)3s1gR8G	z	1	1a4!e< 
2	1	1	1s   <"C((C9	c                      R  p \        V R4      p\        V^RR7       \        V RRRR7      p\        VP                  ^RR7       R# )c                     V ^,
          # r  r   )r%  s   &r   r<   &test_newton_complex_gh10103.<locals>.f  r  r    g-q=r   r`   )r8   r:   rL   Ny      ?      ?y       @      ?)r   r   r   r?   )r<   rv  s     r   test_newton_complex_gh10103rE    s>    
D/CC'
aDVH
=CCHHae,r    c           	          R p\         P                  ! \        VR7      ;_uu_ 4        V ! \        RRRR7       RRR4       R#   + '       g   i     R# ; i)z2'float' object cannot be interpreted as an integerr   r  r   gR@r   N)r   r   r  r   )rL   r   s   & r   test_maxiter_int_check_gh10236rG    s8     CG	y	0	0r3U+ 
1	0	0	0s   AA	c                   a R oR	p^\         P                  ! \        4      P                  ,          ^,          pV3R lp\        P
                  ! \        RR7      ;_uu_ 4        V ! VR
RVR\        R7       RRR4       \        P
                  ! \        RR7      ;_uu_ 4        V ! VR
RVRVR7       RRR4       R#   + '       g   i     LM; i  + '       g   i     R# ; i)rd  c                    < V S,
          # r(   r   r  s   &r   r<   (test_bisect_special_parameter.<locals>.f  r  r    zxtol too smallr   r  r   )r@   r\   r]   Nzrtol too small)r  r  rN  r  r  r  )r   r   r   r   r   r   r   r  )rL   r@   rtolbadr<   r?   s   &   @r   test_bisect_special_parameterrL    s    
 D&D"((5/%%%)G 
z)9	:	:asE< 
;	z)9	:	:asDw? 
;	: 
;	:	:	:	:s   "B:!C:C
	C	)r   r  r   r   r   )Rr  	functoolsr   r   numpy.testingr   r   r   r   numpyr   r   r	   r
   r   r   r   r   r   scipyr   scipy.optimizer   rG   r   r   r   scipy._lib._utilr   rb   scipy.optimize._tstutilsr   r   r   r   r   r  r  r   r   r   r  r   r   gradient_methodsall_methodsr   r"   r&   r)   r,   r/   r1   r3   r5   r   r   r  r  r  r  r  r  r  r  r  r  r   r   r  r	  r  r  r  r#  r/  r4  r:  rA  rE  rG  rL  r   r    r   <module>rV     s     / /  A A A , , G P5\
<<u||U\\=="LL>  00#

  ^M ^MBA@. A@Hc&& c&L	=80'2 218E@
D,>`4"D &%--3013939$-( LNN LN%N%  LN$70 8N0&+  LN$7, 8N,4=.
- ;/, 0, ELL%,,$)LL%,,$@ A@A@r    