+
    nDj8                     v    R t . t^ RIt^RI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)get_lapack_funcsc                       ] tR t^tRtR# )
SqrtmError N)__name__
__module____qualname____firstlineno____static_attributes__r       V/data/cameron/venvs/s3viz/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\        RV3RR7      pV P                  w   p\        Wa,          ^4      p\        Wg4      w  rV^,           p
Wy,
          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TT,          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! 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   trsyl	preferred)ilp64zinternal inconsistencyN)npdiag	isrealobjminasarray
complex128float64sqrtr   shapemaxdivmod	Exceptionrangeappendr   RuntimeErrorr   argsdot)T	blocksizeT_diagkeep_it_realRr   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_triurD      s   4 WWQZF<<?FFrvvfb'AQ'FL JJqS9F"--8JJq

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