+
    /i!                        ^ RI Hu Ht ^ RI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 ^ RIt^ RIHt ]P*                  ! 4       R 4       t]P*                  ! 4       R 4       t]P*                  ! ]P0                  ]P2                  .R	7      R
 4       t]P*                  ! 4       R 4       t]P*                  ! 4       R 4       t ! R R4      tR# )    N)hilbertsvdvalsnormaslinearoperator)interp_decomp)assert_assert_allcloseassert_equalassert_array_equal)raisesc               #      "   R x  R# 5i)-q=N r       c/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/linalg/tests/test_interpolative.pyepsr   )   s
     
Ks   	c               #   T   "   \         P                  P                  R 4      p V x  R# 5i)l   ,b30k0 N)nprandomdefault_rngrngs    r   r   r   .   s     
))

 0
1C
Is   &()paramsc              #   ^   "   R p\        V4      P                  V P                  4      x  R# 5i)i,  N)r   astypeparam)requestns   & r   Ar    4   s%      	A
!*

GMM
**s   +-c              #   (   "   \        V 4      x  R # 5i)Nr   )r    s   &r   Lr"   <   s     
1
s   c                     \         P                  P                  V R R7      p \         P                  ! W!8  4      ^ ,          ^ ,          pV#   \         d    T P
                  ^ ,          p T# i ; i)F)
compute_uv)r   linalgsvdnonzero
IndexErrorshape)r    r   Sranks   &&  r   r+   r+   A   sa    
		aE*Azz!'"1%a( K  wwqzKs   &A A-,A-c                     a  ] tR t^Kt o ]P
                  P                  R. RO4      R 4       t]P
                  P                  R. RO4      R 4       t]P
                  P                  RR.4      R 4       t	]P
                  P                  R. RO4      R 4       t
]P
                  P                  R. RO4      R 4       tR	 tR
 tR tR tR tR tR tR t]P
                  P                  R]P*                  ]P,                  .4      ]P
                  P                  RRR.4      ]P
                  P                  R^R.4      R 4       4       4       tR tRtV tR# )TestInterpolativeDecompositionzrand,lin_opFTc                    V'       g   TMTp\         P                  ! WsWFR 7      w  rp
\         P                  ! VRV	RV 3,          W4      p\        WVRR7       R# randr   NNNN:0yE>rtolatol
pymatrixidr   reconstruct_matrix_from_idr
   )selfr    r"   r   r1   lin_opr   A_or_LkidxprojBs   &&&&&&&     r   test_real_id_fixed_precision;TestInterpolativeDecomposition.test_real_id_fixed_precisionM   sO    
 !a!//$P11!As2AwJ-K3U3r   c                    TpV'       g   TMTp	\         P                  ! WWWR 7      w  r\         P                  ! VRV
RV 3,          W4      p\        WVRR7       R# r/   r7   )r:   r    r"   r   r+   r1   r;   r   r=   r<   r>   r?   r@   s   &&&&&&&&     r   test_real_id_fixed_rank6TestInterpolativeDecomposition.test_real_id_fixed_rankX   sR      a,,VTK	11!As2AwJ-K3U3r   c                   TpV'       g   TMTp	\         P                  ! WWWR 7      w  r\         P                  ! W4      p\         P                  ! WV
4      p\	        WRV
RV 3,          VRR7       \	        W,          WRR7       R# r/   )r8   r   reconstruct_interp_matrixreconstruct_skel_matrixr
   )r:   r    r"   r   r+   r1   r;   r   r=   r<   r>   r?   Pr@   s   &&&&&&&&      r   %test_real_id_skel_and_interp_matricesDTestInterpolativeDecomposition.test_real_id_skel_and_interp_matricesc   sp      a,,VTK	00;..qS9QBQZ=s?q7r   c                    V'       g   TMTp\         P                  ! WsWFR 7      w  rp
W,          V
P                  P                  4       ,          p\	        WVRR7       R# r0   r3   r4   Nr8   r&   Tconjr
   )r:   r    r"   r   r1   r;   r   r<   Ur*   Vr@   s   &&&&&&&     r   test_svd_fixed_precision7TestInterpolativeDecomposition.test_svd_fixed_precisiono   sC     !a..4AaEACCHHJ3U3r   c                    TpV'       g   TMTp	\         P                  ! WWWR 7      w  rpW,          VP                  P                  4       ,          p\	        WVRR7       R# rM   rN   )r:   r    r"   r   r+   r1   r;   r   r=   r<   rQ   r*   rR   r@   s   &&&&&&&&      r   test_svd_fixed_rank2TestInterpolativeDecomposition.test_svd_fixed_ranky   sH      a..?aEACCHHJ3U3r   c                    Tp\         P                  ! WR R7      w  rV\         P                  ! VRVRV 3,          WV4      w  rxp	Wx,          V	P                  P	                  4       ,          p
\        WVRR7       R# )Fr1   r2   Nr3   r4   )r8   r   	id_to_svdrO   rP   r
   )r:   r    r   r+   r=   r>   r?   rQ   r*   rR   r@   s   &&&&       r   test_id_to_svd-TestInterpolativeDecomposition.test_id_to_svd   sa    ,,Q>	&&qCG}c@aEACCHHJ3U3r   c                t    \        V4      p\        P                  ! WR 7      p\        WC^ ,          RRR7       R# )r   ư>r3   r4   N)r   r8   estimate_spectral_normr
   )r:   r    r   s
norm_2_ests   &&&  r   test_estimate_spectral_norm:TestInterpolativeDecomposition.test_estimate_spectral_norm   s+    AJ66qB

aDt$?r   c                    VP                  4       pVR;;,          R,          uu&   \        W,
          4      p\        P                  ! WVR7      p\	        WT^ ,          RRR7       R# )r2   g333333?r   r^   r3   r4   N)r2   r   )copyr   r8   estimate_spectral_norm_diffr
   )r:   r    r   r@   r`   ra   s   &&&   r    test_estimate_spectral_norm_diff?TestInterpolativeDecomposition.test_estimate_spectral_norm_diff   sG    FFH	$3AEN;;AcJ

aDt$?r   c                H   \         P                  ! . RO. RO. RO.VP                  R7      pW3 Fo  pRp\         P                  P	                  V\        V^4      V,          4      p\        P                  ! WEVR7      p\        Wv8  4       \        Wv^
,           8*  4       Kq  	  R#    )dtypeg&.>r   N)rk   rk   r   )r   r   rk   )	r   arrayrl   r%   matrix_rankr   r8   estimate_rankr	   )r:   r    r   r@   Mrank_tolrank_nprank_ests   &&&     r   test_rank_estimates_array8TestInterpolativeDecomposition.test_rank_estimates_array   s{    HHiI6aggFAHii++AtAqzH/DEG!//EHH'(H",- r   c                l   \         P                  ! . RO. RO. RO.VP                  R7      pW3 F  p\        V4      pRp\         P                  P                  V\        V^4      V,          4      p\        P                  ! WVVR7      p\        W^,
          8  4       \        W^,           8*  4       K  	  R# rj   )
r   rm   rl   r   r%   rn   r   r8   ro   r	   )	r:   r    r   r@   rp   MLrq   rr   rs   s	   &&&      r   test_rank_estimates_lin_op9TestInterpolativeDecomposition.test_rank_estimates_lin_op   s    HHiI6aggFA!!$BHii++AtAqzH/DEG!//#FHH!+,H!+, r   c                    \        ^4      P                  \        P                  4      p\	        \
        4      ;_uu_ 4        \        P                  ! VRRR7       RRR4       R#   + '       g   i     R# ; i)   r^   FrY   N)r   r   r   float32assert_raises
ValueErrorr8   r   )r:   r    s   & r   test_badcall+TestInterpolativeDecomposition.test_badcall   sF    AJbjj):&&$$Q59 '&&&s    A$$A5	c                    \         P                  ! R4      p\        \        4      ;_uu_ 4        \        P
                  ! V^4       RRR4       R#   + '       g   i     R# ; i)   N)r      )r   onesr}   r~   r8   r&   )r:   as   & r   test_rank_too_large2TestInterpolativeDecomposition.test_rank_too_large   s7    GGFO:&&NN1a  '&&&s   AA!	c                    R p\         P                  P                  R4      pVP                  R4      p\        P                  ! W14      w  rEp\        WCP                  ^,          4       \        P                  ! WV4      p\        P                  ! W4V4      p\        W8V,          4       \        P                  ! W44      w  rV\        P                  ! WV4      p\        P                  ! W4V4      p\        W8V,          4       R# )r   i  N)      )
r   r   r   r8   r   r   r)   rG   rH   r
   )	r:   r   r   r    r=   r>   r?   rI   r@   s	   &        r   test_full_rank-TestInterpolativeDecomposition.test_full_rank   s    ii##D)JJw!//7Q
#00;..qS9q5! ,,Q2	00;..qS9q5!r   rl   r1   r   g?c                    \         P                  ! . RO. RO. RO. RO. R	O.VRR7      pVP                  4       p\        VP                  W2R7       \        WE4       R# )
rk   C)rl   orderrY   N)r   r   r   r   r   )r   r   r   rk   rk   rk   )rk   r   r   rk   r   r   )r   rk   r   r   rk   r   )r   r   rk   r   r   rk   )r   rm   re   r   rO   r   )r:   rl   r1   r   r    r@   s   &&&&  r   test_bug_9793,TestInterpolativeDecomposition.test_bug_9793   sP     HH+((((	*
 !- FFHacc3*1 r   c                0   \         P                  P                  R 4      pVP                  ^^.R7      p\	        V4      p\
        P                  ! V^4      w  rEp\        VP                  R4       \        VP                  R4       \        VP                  R4       VP                  ^^	.R7      p\	        V4      p\
        P                  ! V^4      w  rEp\        VP                  R4       \        VP                  R4       \        VP                  R4       R# )	l   CaNJ1 )sizeN)   r   )r   )r{   r   )r      )r   )	   r   )	r   r   r   uniformr   r8   r&   r   r)   )r:   r   xxlur`   vs   &      r   %test_svd_aslinearoperator_shape_checkDTestInterpolativeDecomposition.test_svd_aslinearoperator_shape_check   s    ii##$45KKaVK$a ..Q'aQWWf%QWWd#QWWf%KKaVK$a ..Q'aQWWf%QWWd#QWWf%r   r   NFF)r   )TF)TT)__name__
__module____qualname____firstlineno__pytestmarkparametrizerA   rD   rJ   rS   rV   r[   rb   rg   rt   rx   r   r   r   r   float64
complex128r   r   __static_attributes____classdictcell__)__classdict__s   @r   r-   r-   K   sp    [[57474 [[57474 [[]^,<=	8 >	8 [[57474 [[574744@
@.	-:
!"& [[Wrzz2==&AB[[VdE]3[[UQH-	! . 4 C	!& &r   r-   )scipy.linalg.interpolativer%   interpolativer8   numpyr   scipy.linalgr   r   r   scipy.sparse.linalgr   r   numpy.testingr	   r
   r   r   r   r   r}   fixturer   r   r   r   r    r"   r+   r-   r   r   r   <module>r      s   : 0 /  / / 0 4/ /  *    
 

BMM23+ 4+    ]& ]&r   