+
    /iL                     x   ^ RI t^ RIHtHt ^ RIHtHtHt ^ RI	H
t
 ^ RIHt ^RIHtHtHtHtHtHtHtHt ^RIHtHt Rt]P4                  ! ^],
          ^
,          ^],           ^
,          ^.4      t]P4                  ! R^],          ,
          R^],          ,           R.4      ^,          tRtRt]P4                  ! . RO. RO. RO.4      t]P4                  ! . RO. RO. RO.4      t ] ^ ,          t!] ^,          R] ^,          ,          ,           t"]P4                  ! R^],          ^,          ,           R^],          ^,          ,
          R^],          ,           .R^],          ^,          ,
          R^],          ^,          ,           R^],          ,
          .. RO.4      t#^t$R	t%^
t&R
 t'R t( ! R R]4      t) ! R R]4      t*R# )    N)	lu_factorlu_solve)
csc_matrixissparseeye)splu)group_columns)validate_max_stepvalidate_tolselect_initial_stepnormnum_jacEPSwarn_extraneousvalidate_first_step)	OdeSolverDenseOutput              ?g?c
                   VP                   ^ ,          p
\        V,          p\        V,          p\        P	                  V4      pTp\
        P                  ! ^V
34      pV\        ,          pRp\
        P                  ! V4      pRpRp\        \        4       EF  p\        ^4       F*  pV ! VVV,          ,           W.V,          ,           4      VV&   K,  	  \
        P                  ! \
        P                  ! V4      4      '       g    EMZVP                  P	                  \        4      W^ ,          ,          ,
          pVP                  P	                  \        4      W^,          RV^,          ,          ,           ,          ,
          pV	! VV4      pV	! VV4      pVV^ &   VP                   V^&   VP"                  V^&   \%        VV,          4      pVe
   VV,          pVe8   V^8  g/   V\        V,
          ,          ^V,
          ,          V,          V8  d    MPVV,          p\        P	                  V4      pV^ 8X  g!   Ve!   V^V,
          ,          V,          V8  d   Rp MTpEK  	  VX^,           VV3# )a  Solve the collocation system.

Parameters
----------
fun : callable
    Right-hand side of the system.
t : float
    Current time.
y : ndarray, shape (n,)
    Current state.
h : float
    Step to try.
Z0 : ndarray, shape (3, n)
    Initial guess for the solution. It determines new values of `y` at
    ``t + h * C`` as ``y + Z0``, where ``C`` is the Radau method constants.
scale : ndarray, shape (n)
    Problem tolerance scale, i.e. ``rtol * abs(y) + atol``.
tol : float
    Tolerance to which solve the system. This value is compared with
    the normalized by `scale` error.
LU_real, LU_complex
    LU decompositions of the system Jacobians.
solve_lu : callable
    Callable which solves a linear system given a LU decomposition. The
    signature is ``solve_lu(LU, b)``.

Returns
-------
converged : bool
    Whether iterations converged.
n_iter : int
    Number of completed iterations.
Z : ndarray, shape (3, n)
    Found solution.
rate : float
    The rate of convergence.
NFr   T)shapeMU_REAL
MU_COMPLEXTIdotnpemptyC
empty_likerangeNEWTON_MAXITERallisfiniteTTI_REAL
TI_COMPLEXrealimagr   )funtyhZ0scaletolLU_real
LU_complexsolve_lunM_real	M_complexWZFchdW_norm_olddW	convergedratekif_real	f_complexdW_real
dW_complexdW_norms   &&&&&&&&&&                  X/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/integrate/_ivp/radau.pysolve_collocation_systemrE   0   s   N 	

Aq[FQI
r
A
A
!QA	
QBK	q	BID>"qAq2a5y!d(+AaD  vvbkk!n%%!FqTM1CCGGJ')tb1Q4i7G*HH	7F+j)4
111rEz""[(D$!)!+,D9GCcI	REE!HqL TQX%6%@3%FIC #F a!eQ$$    c                   Ve   Ve   V^ 8X  d   ^pMW,          W2,          R,          ,          p\         P                  ! RR7      ;_uu_ 4        \        ^V4      VR,          ,          pRRR4       V#   + '       g   i     X# ; i)a  Predict by which factor to increase/decrease the step size.

The algorithm is described in [1]_.

Parameters
----------
h_abs, h_abs_old : float
    Current and previous values of the step size, `h_abs_old` can be None
    (see Notes).
error_norm, error_norm_old : float
    Current and previous values of the error norm, `error_norm_old` can
    be None (see Notes).

Returns
-------
factor : float
    Predicted factor.

Notes
-----
If `h_abs_old` and `error_norm_old` are both not None then a two-step
algorithm is used, otherwise a one-step algorithm is used.

References
----------
.. [1] E. Hairer, S. P. Norsett G. Wanner, "Solving Ordinary Differential
       Equations II: Stiff and Differential-Algebraic Problems", Sec. IV.8.
Ng      ?ignore)divideg      п)r   errstatemin)h_abs	h_abs_old
error_normerror_norm_old
multiplierfactors   &&&&  rD   predict_factorrR      sp    : !2jAo
&.*E$)NN
	H	%	%Q
#jE&99 
& M 
&	% Ms   A33B	c                   t   a a ] tR t^t oRt]P                  RRRRRR3V 3R lltR tR t	R	 t
R
 tRtVtV ;t# )Radaua  Implicit Runge-Kutta method of Radau IIA family of order 5.

The implementation follows [1]_. The error is controlled with a
third-order accurate embedded formula. A cubic polynomial which satisfies
the collocation conditions is used for the dense output.

Parameters
----------
fun : callable
    Right-hand side of the system: the time derivative of the state ``y``
    at time ``t``. The calling signature is ``fun(t, y)``, where ``t`` is a
    scalar and ``y`` is an ndarray with ``len(y) = len(y0)``. ``fun`` must
    return an array of the same shape as ``y``. See `vectorized` for more
    information.
t0 : float
    Initial time.
y0 : array_like, shape (n,)
    Initial state.
t_bound : float
    Boundary time - the integration won't continue beyond it. It also
    determines the direction of the integration.
first_step : float or None, optional
    Initial step size. Default is ``None`` which means that the algorithm
    should choose.
max_step : float, optional
    Maximum allowed step size. Default is np.inf, i.e., the step size is not
    bounded and determined solely by the solver.
rtol, atol : float and array_like, optional
    Relative and absolute tolerances. The solver keeps the local error
    estimates less than ``atol + rtol * abs(y)``. HHere `rtol` controls a
    relative accuracy (number of correct digits), while `atol` controls
    absolute accuracy (number of correct decimal places). To achieve the
    desired `rtol`, set `atol` to be smaller than the smallest value that
    can be expected from ``rtol * abs(y)`` so that `rtol` dominates the
    allowable error. If `atol` is larger than ``rtol * abs(y)`` the
    number of correct digits is not guaranteed. Conversely, to achieve the
    desired `atol` set `rtol` such that ``rtol * abs(y)`` is always smaller
    than `atol`. If components of y have different scales, it might be
    beneficial to set different `atol` values for different components by
    passing array_like with shape (n,) for `atol`. Default values are
    1e-3 for `rtol` and 1e-6 for `atol`.
jac : {None, array_like, sparse_matrix, callable}, optional
    Jacobian matrix of the right-hand side of the system with respect to
    y, required by this method. The Jacobian matrix has shape (n, n) and
    its element (i, j) is equal to ``d f_i / d y_j``.
    There are three ways to define the Jacobian:

        * If array_like or sparse_matrix, the Jacobian is assumed to
          be constant.
        * If callable, the Jacobian is assumed to depend on both
          t and y; it will be called as ``jac(t, y)`` as necessary.
          For the 'Radau' and 'BDF' methods, the return value might be a
          sparse matrix.
        * If None (default), the Jacobian will be approximated by
          finite differences.

    It is generally recommended to provide the Jacobian rather than
    relying on a finite-difference approximation.
jac_sparsity : {None, array_like, sparse matrix}, optional
    Defines a sparsity structure of the Jacobian matrix for a
    finite-difference approximation. Its shape must be (n, n). This argument
    is ignored if `jac` is not `None`. If the Jacobian has only few non-zero
    elements in *each* row, providing the sparsity structure will greatly
    speed up the computations [2]_. A zero entry means that a corresponding
    element in the Jacobian is always zero. If None (default), the Jacobian
    is assumed to be dense.
vectorized : bool, optional
    Whether `fun` can be called in a vectorized fashion. Default is False.

    If ``vectorized`` is False, `fun` will always be called with ``y`` of
    shape ``(n,)``, where ``n = len(y0)``.

    If ``vectorized`` is True, `fun` may be called with ``y`` of shape
    ``(n, k)``, where ``k`` is an integer. In this case, `fun` must behave
    such that ``fun(t, y)[:, i] == fun(t, y[:, i])`` (i.e. each column of
    the returned array is the time derivative of the state corresponding
    with a column of ``y``).

    Setting ``vectorized=True`` allows for faster finite difference
    approximation of the Jacobian by this method, but may result in slower
    execution overall in some circumstances (e.g. small ``len(y0)``).

Attributes
----------
n : int
    Number of equations.
status : string
    Current status of the solver: 'running', 'finished' or 'failed'.
t_bound : float
    Boundary time.
direction : float
    Integration direction: +1 or -1.
t : float
    Current time.
y : ndarray
    Current state.
t_old : float
    Previous time. None if no steps were made yet.
step_size : float
    Size of the last successful step. None if no steps were made yet.
nfev : int
    Number of evaluations of the right-hand side.
njev : int
    Number of evaluations of the Jacobian.
nlu : int
    Number of LU decompositions.

References
----------
.. [1] E. Hairer, G. Wanner, "Solving Ordinary Differential Equations II:
       Stiff and Differential-Algebraic Problems", Sec. IV.8.
.. [2] A. Curtis, M. J. D. Powell, and J. Reid, "On the estimation of
       sparse Jacobian matrices", Journal of the Institute of Mathematics
       and its Applications, 13, pp. 117-120, 1974.
MbP?gư>NFc                  <a  \        V4       \        SS `	  WW4V
4       R S n        \	        V4      S n        \        WgS P                  4      w  S n        S n	        S P                  S P                  S P                  4      S n        Vf`   \        S P                  S P                  S P                  WES P                  S P                  ^S P                  S P                  4
      S n        M\#        WV4      S n        R S n        R S n        \)        ^
\*        ,          V,          \-        RVR,          4      4      S n        R S n        R S n        S P5                  W4      w  S n        S n        \;        S P8                  4      '       d"   V 3R lpR p\=        S P                  RR7      pM)V 3R lpR p\>        P@                  ! S P                  4      pVS n!        VS n"        VS n#        R	S n$        R S n%        R S n&        R S n'        R # )
NgQ?      ?c                 L   < S;P                   ^,          un         \        V 4      #    )nlur   Aselfs   &rD   luRadau.__init__.<locals>.luA  s    AAwrF   c                 $    V P                  V4      # N)solveLUbs   &&rD   r1    Radau.__init__.<locals>.solve_luE  s    xx{"rF   csc)formatc                 P   < S;P                   ^,          un         \        V RR7      # )rZ   T)overwrite_a)r[   r   r\   s   &rD   r_   r`   J  s    A 55rF   c                     \        WR R7      # )T)overwrite_b)r   rd   s   &&rD   r1   rg   N  s    488rF   T)(r   super__init__y_oldr
   max_stepr   r2   rtolatolr(   r)   r*   fr   	directionrL   r   rM   rO   maxr   rK   
newton_tolsol
jac_factor_validate_jacjacJr   r   r   identityr_   r1   Icurrent_jacr/   r0   r6   )r^   r(   t0y0t_boundrq   rr   rs   r{   jac_sparsity
vectorized
first_step
extraneousr_   r1   r~   	__class__s   f&&&&&&&&&&&,   rD   ro   Radau.__init__'  s    	
#"z:
)(3+D?	49$&&$&&) ,$&&$&&'TVVT^^499dii)DJ -ZWEDJ"b3hos4/EF--c@$&DFF# DFF5)A69 DFF#A rF   c                  a aa S P                   pS P                  pSfM   Se,   \        S4      '       d   \        S4      o\	        S4      pSV3oV V3R lpV! W4S P
                  4      pWg3# \        S4      '       d   S! W44      p^S n        \        V4      '       d   \        V4      pRVV 3R llpM%\        P                  ! V\        R7      pRVV 3R llpVP                  S P                  S P                  38w  d3   \        RS P                  S P                  3 RVP                   R24      h Wg3# \        S4      '       d   \        S4      pM\        P                  ! S\        R7      pVP                  S P                  S P                  38w  d3   \        RS P                  S P                  3 RVP                   R24      hR pWg3# )	Nc           	         < S;P                   ^,          un         \        SP                  WVSP                  SP                  S4      w  pSn        V# rY   )njevr   fun_vectorizedrs   ry   )r)   r*   rt   r|   r^   sparsitys   &&& rD   jac_wrapped(Radau._validate_jac.<locals>.jac_wrappedg  sD    		Q	%,T-@-@!-1YY-5&7"4? rF   c                 d   < S;P                   ^,          un         \        S! W4      \        R7      # rZ   dtype)r   r   floatr)   r*   _r{   r^   s   &&&rD   r   r   t  s!    IINI%c!iu==rF   r   c                 z   < S;P                   ^,          un         \        P                  ! S! W4      \        R7      # r   )r   r   asarrayr   r   s   &&&rD   r   r   {  s%    IINI::c!iu==rF   z `jac` is expected to have shape z, but actually has .rb   )r)   r*   r   r   r	   rt   callabler   r   r   r   r   r2   
ValueError)r^   r{   r   r   r   groupsr   r|   s   fff     rD   rz   Radau._validate_jac\  s   VVVV;#H%%)(3H&x0$f- BDFF+A@ ~? c]]BADI{{qM> >
 JJq.> > ww466466** #CTVVTVVDTCU V667ggYa"A B B + ~ }}sOJJs%0ww466466** #CTVVTVVDTCU V667ggYa"A B BK~rF   c                t   V P                   pV P                  pV P                  pV P                  pV P                  pV P
                  p^
\        P                  ! \        P                  ! WP                  \        P                  ,          4      V,
          4      ,          pV P                  V8  d   TpRp	Rp
M<V P                  V8  d   TpRp	Rp
M$V P                  pV P                  p	V P                  p
V P                  pV P                  pV P                   pV P"                  pV P$                  pRpRpRpV'       Egx   W8  d   RV P&                  3# WP                  ,          pVV,           pV P                  VV P(                  ,
          ,          ^ 8  d   V P(                  pVV,
          p\        P                  ! V4      pV P*                  f+   \        P,                  ! ^VP.                  ^ ,          34      pM4V P+                  VV\0        ,          ,           4      P2                  V,
          pV\        P                  ! V4      V,          ,           pRpV'       g   Ve   Vfi   V P5                  \6        V,          V P8                  ,          V,
          4      pV P5                  \:        V,          V P8                  ,          V,
          4      p\=        V P>                  WVVVV P@                  WV PB                  4
      w  ppppV'       d   K  V'       d   MV P%                  WV4      pRpRpRpK  V'       g   VR,          pRpRpEK  VXR,          ,           pVP2                  PE                  \F        4      V,          pV PC                  WV,           4      pV\        PH                  ! \        P                  ! V4      \        P                  ! V4      4      V,          ,           p\K        VV,          4      pR^\L        ,          ^,           ,          ^\L        ,          X,           ,          pV'       dH   V^8  dA   V PC                  WP?                  WV,           4      V,           4      p\K        VV,          4      pV^8  d5   \O        WVV
4      p V\Q        \R        VV ,          4      ,          pRpRpRpEK{  RpEK  VRJ;'       d    X^8  ;'       d    XR8  p!\O        WXV
4      p \U        \V        XV ,          4      p V!'       g   V R8  d   ^p MRpRpV P?                  XX4      p"V!'       d   V! VVV"4      pRpMVe   RpV P                  V n        VV n        VV ,          V n        W n,        VV n         VV n        V"V n        XV n-        Wn        Wn        Wn        Wn        Wn.        V P_                  4       V n        VV3# )	
   NFTrW   g?rU   g333333?)0r)   r*   rt   rq   rs   rr   r   abs	nextafterru   infrL   rM   rO   r|   r/   r0   r   r{   TOO_SMALL_STEPr   rx   zerosr   r   r#   r_   r   r~   r   rE   r(   rw   r1   r   Emaximumr   r    rR   rv   
MIN_FACTORrK   
MAX_FACTORrp   r6   t_old_compute_dense_output)#r^   r)   r*   rt   rq   rs   rr   min_steprL   rM   rO   r|   r/   r0   r   r{   rejectedstep_acceptedmessager+   t_newr,   r-   r;   n_iterr6   r<   y_newZEerrorrN   safetyrQ   recompute_jacf_news#   &                                  rD   
_step_implRadau._step_impl  s   FFFFFF==yyyyr||A~~/FG!KLL:: EI!NZZ("EI!NJJEI!00NFF,,__
&&hh-d1111&AEE~~!56:	AFF1IExxXXq!''!*o.XXa!a%i(**Q.266!9t++EI?j&8"gggkDFF&:Q&>?G!%a$&&)@1)D!EJ-EHHaAr5$//.8*	61d !y"q)A"&K"G!%J!
"IEaBMM'r62E2::bffQi?$FFEeem,JA.23q>7I9?8@ AF JNgxxu9/E/JK!%%-0
A~'(2NDZ&99!
 $4FFFQJFF4$;*nMZ&1#FGJ&E5%(AK_K(V^

$&
--/g%%rF   c                    \         P                  ! V P                  P                  \        4      p\        V P                  V P                  V P                  V4      # rb   )	r   r   r6   r#   PRadauDenseOutputr   r)   rp   )r^   Qs   & rD   r   Radau._compute_dense_output  s7    FF46688Q

DFFDJJBBrF   c                    V P                   # rb   )rx   )r^   s   &rD   _dense_output_implRadau._dense_output_impl!  s    xxrF   )r~   r|   r0   r/   r6   rs   r   rO   rt   rL   rM   r{   ry   r_   rq   rw   r   rr   rx   r1   r)   r   r*   rp   )__name__
__module____qualname____firstlineno____doc__r   r   ro   rz   r   r   r   __static_attributes____classdictcell____classcell__r   __classdict__s   @@rD   rT   rT      sF     rf 79ff4d!d3j1fL&\C rF   rT   c                   8   a a ] tR tRt oV 3R ltR tRtVtV ;t# )r   i%  c                   < \         SV `  W4       W!,
          V n        W@n        VP                  ^,          ^,
          V n        W0n        R# )rZ   N)rn   ro   r+   r   r   orderrp   )r^   r   r)   rp   r   r   s   &&&&&rD   ro   RadauDenseOutput.__init__&  s6    "WWQZ!^

rF   c                *   WP                   ,
          V P                  ,          pVP                  ^ 8X  d?   \        P                  ! W P
                  ^,           4      p\        P                  ! V4      pMA\        P                  ! W P
                  ^,           ^34      p\        P                  ! V^ R7      p\        P                  ! V P                  V4      pVP                  ^8X  d   W@P                  R,          ,          pV# W@P                  ,          pV# )r   )axis):NNNN)
r   r+   ndimr   tiler   cumprodr   r   rp   )r^   r)   xpr*   s   &&   rD   
_call_implRadauDenseOutput._call_impl-  s    ^tvv%66Q;::>*A

1AJJNA./A

11%AFF466166Q;G$$A  OArF   )r   r+   r   rp   )	r   r   r   r   ro   r   r   r   r   r   s   @@rD   r   r   %  s      rF   r   g.!	@ir   gs>H@yrr@Gg)g{g]#-?g;@L¿ghm?)g
}?gQ  ?gmؿ)rZ   rZ   r   )gF@gN]?gV?)gFgN]Կg!R ?)g$Z?goNg{?gUUUUUU@g竪
@)gUUUUUU?gUUUUUUr   )+numpyr   scipy.linalgr   r   scipy.sparser   r   r   scipy.sparse.linalgr   scipy.optimize._numdiffr	   commonr
   r   r   r   r   r   r   r   baser   r   S6arrayr   r   r   r   r#   r   r$   r%   r   r    r   r   rE   rR   rT   r    rF   rD   <module>r      s    , 2 2 $ 1* * * ) HHq2vma"f]A./HHcAFlC!b&L"-.2 *5
 HHDD  XXCEDF G
 Q%UR"Q%Z
 HH	AbDF]EBrE!GOTAF]3	AbDF]EBrE!GOTAF]3  

X%v%PoI od{ rF   