+
    /i_                     z    R t . t^ RIt^RIHtHt  ! R R]P                  P                  4      t	^RI
Ht RR ltR# )zz
Matrix square root for general matrices and for upper triangular matrices.

This module exists to avoid cyclic imports.

N)ztrsyldtrsylc                       ] tR t^tRtR# )
SqrtmError N)__name__
__module____qualname____firstlineno____static_attributes__r       Z/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/linalg/_matfuncs_sqrtm.pyr   r      s    r   r   )within_block_loopc           	        \         P                  ! V 4      p\         P                  ! V 4      ;'       d    \         P                  ! VRR7      ^ 8  pV'       gO   \         P                  ! V \         P
                  RR7      p \         P                  ! V\         P
                  R7      pMM\         P                  ! V \         P                  RR7      p \         P                  ! V\         P                  R7      p\         P                  ! \         P                  ! V4      4      pV P                  w   p\        WQ,          ^4      p\        WV4      w  rxV^,           p	Wh,
          p
W,          W,          ,           V8w  d   \        R4      h. p^ pW3W33 F8  w  r\        V4       F$  pVP                  WV,           34       W,          pK&  	  K:  	   \        W@W4       \        T4       F  pTT,          w  pp\        T^,
          RR4       F  pY,          w  ppT TT1TT13,          pTT,
          ^8  d3   TTTT1TT13,          P%                  TTT1TT13,          4      ,
          pTTT1TT13,          pTTT1TT13,          pT'       d   \'        TTT4      w  pppM\)        TTT4      w  pppTT,          TTT1TT13&   K  	  K  	  T#   \         d   p\!        TP"                  !  ThRp?ii ; i)	a  
Matrix square root of an upper triangular matrix.

This is a helper function for `sqrtm` and `logm`.

Parameters
----------
T : (N, N) array_like upper triangular
    Matrix whose square root to evaluate
blocksize : int, optional
    If the blocksize is not degenerate with respect to the
    size of the input array, then use a blocked algorithm. (Default: 64)

Returns
-------
sqrtm : (N, N) ndarray
    Value of the sqrt function at `T`

References
----------
.. [1] Edvin Deadman, Nicholas J. Higham, Rui Ralha (2013)
       "Blocked Schur Algorithms for Computing the Matrix Square Root,
       Lecture Notes in Computer Science, 7782. pp. 171-182.

g        )initialC)dtypeorder)r   zinternal inconsistencyN)npdiag	isrealobjminasarray
complex128float64sqrtshapemaxdivmod	Exceptionrangeappendr   RuntimeErrorr   argsdotr   r   )T	blocksizeT_diagkeep_it_realRnnblocksbsmallnlargeblargensmallstart_stop_pairsstartcountsizeiejjstartjstopistartistopSRiiRjjxscaleinfos   &&                          r   _sqrtm_triurB      s   4 WWQZF<<?FFrvvfb'AQ'FL JJqS9F"--8JJq

#6F"**5
 A 77DAq!.!$G A'NFaZFF(A-011 E(6*:;uA##UDL$9:ME  <)! 0:
 7^(+qsB#A,/MFE&,u,-A1uqy&,f4599!E&L<B5L=I ;J K K F5L&,./CF5L&,./C!'S!!45$!'S!!45$,-IAfUlF5L()! $ * H3  )!&&!q()s   K K(K##K()@   )__doc____all__numpyr   lapackr   r   linalgLinAlgErrorr   _matfuncs_sqrtm_triur   rB   r   r   r   <module>rK      s:      #	&& 	 4Wr   