+
    0ij7                      	   ^ RI t ^ RIt^ RIHt ^ RIt^ RIH	u H
t RKt] U u. uF  p ]! ]P                  V  R	24      NK  	  up t]P                  ! . RLO. RMO. RNO.4      t]P                  ! ^ ^.^^ ..4      t]P                  ! . ROO. RPO. RQO. RRO.]R
7      t] Uu. uF
  q! ]4      NK  	  upt] Uu. uF
  q! ]4      NK  	  upt] Uu. uF
  q! ]4      NK  	  upt] P.                  P1                  R]]R7      t] P.                  P1                  R]]R7      t] P.                  P1                  R]]R7      t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t ]R 4       t!]R 4       t"]R 4       t#]R 4       t$]R 4       t%]R 4       t&]R 4       t']R 4       t(]R 4       t)]R 4       t*]R 4       t+]R 4       t,]R  4       t-]R! 4       t.]R" 4       t/]R# 4       t0]R$ 4       t1]R% 4       t2]R& 4       t3] P.                  P1                  R'RR.4      R( 4       t4]R) 4       t5]] P.                  P1                  R*. RSO4      R+ 4       4       t6]] P.                  P1                  R*R,R-.4      R. 4       4       t7]R/ 4       t8]R0 4       t9]R1 4       t:R2 t;R3 t<] P.                  P1                  R4]P                  Pz                  R5R6.3]P                  P|                  R5R6.3]P                  P~                  R7R8.3.4      ] P.                  P1                  R9]P                  ]P                  .4      R: 4       4       tBR; tCR< tDR= tER> tFR? tGR@ tHRA tIRB tJRC tK] P.                  P1                  RD]P                  P                  ]P                  P                  34      RE 4       tNRF tORG tPRH tQRI tR] P.                  P1                  RTR]P                  P                  3R]P                  P                  3R]P                  P                  3R]P                  P                  3R]P                  P                  3R]P                  P                  3R]P                  P                  334      RJ 4       tZR# u up i u upi u upi u upi )U    Nbsrcoocsccsrdiadoklil_arraydtypeA)idsBXc                     \        V P                  ^ R7      \        P                  4      '       d   Q R4       hV P                  ^ R7      P                  R8X  g   Q hV P                  ^R7      P                  R8X  g   Q hR# )r   axisExpected array, got matrixN)   )   )
isinstancesumnpmatrixshaper   s   &_/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/sparse/tests/test_array_api.pytest_sumr   0   si    !%%Q%-33 %$%355a5=$&&&55a5=$&&&    c                 t    \        V P                  ^R7      \        P                  4      '       d   Q R4       hR# )   r   r   N)r   meanr   r   r   s   &r   	test_meanr#   8   s0    !&&a&."))44 %$%44r   c                 R   \        V R 4      '       d8   \        V P                  ^R7      \        P                  4      '       d   Q R4       h\        V R4      '       d8   \        V P                  ^R7      \        P                  4      '       d   Q R4       h\        V R4      '       d8   \        V P                  ^R7      \        P                  4      '       d   Q R4       h\        V R4      '       d:   \        V P                  ^R7      \        P                  4      '       d   Q R4       hR# R# )minr   r   maxargminargmaxN)hasattrr   r%   r   r   r&   r'   r(   r   s   &r   test_min_maxr*   >   s     q%aeeemRYY77 	)(	)7q%aeeemRYY77 	)(	)7q(ahhAh.		:: 	)(	):q(ahhAh.		:: 	)(	):: r   c                 p    \        V P                  4       \        P                  4      '       d   Q R 4       hR# r   N)r   todenser   r   r   s   &r   test_todenser.   O   s,    !))+ryy11 %$%11r   c                    V P                   P                  R ,          R9   d   R# V R,          V R,          V ^^^.3,          V ^^.^3,          V ^ .,          V R^^.3,          V ^^.R3,          V ^^^..3,          V ^^..^3,          3	pV FK  p\        V\        P                  P
                  4      '       d   K/  Q RVP                  P                   24       h	  R# )Nr   NNNNNzExpected sparse array, got )r   r   r   )r!   r1   )r1   r!   )	__class____name__r   scipysparsesparray_class__)r   all_resress   &  r   test_indexingr:   U   s    {{B#88 	
$	$	!aV)	1a&!)	1#	!aV)	1a&!)	!q!fX+	Aq6(A+
G #u||3344 	B)#,,*?*?)@A	B4 r   c                     \         P                  P                  V P                  4      p\        W,           \         P                  4      '       d   Q R 4       hR# r,   )r   randomr   r   r   )r   r   s   & r   test_dense_additionr=   k   s<    
		!A!%++I-II++r   c                 t    \        W ,           \        P                  P                  4      '       g   Q R 4       hR# r,   r   r4   r5   r6   r   s   &r   test_sparse_additionr@   q   s'    quu||3344R6RR4r   c                     \         P                  ! W ,          P                  4       V P                  ^4      P                  4       8H  4      '       g   Q hR# )   N)r   allr-   powerr   s   &r   test_elementwise_mulrE   v   s6    6615//#qwwqz'9'9';;<<<<r   c           	         \         P                  ! \        4      ;_uu_ 4        R V ,           R R R 4       \         P                  ! \        4      ;_uu_ 4        \        P
                  ! ^4      \        P                  P                  \        P                  ! ^4      P                  ^^4      4      ,           R R R 4       \        P                  ! ^V ,          V P                  4       ^,          8H  4      '       g   Q h\        P                  ! V P                  4       V ,          V P                  4       ^,          8H  4      '       g   Q hR #   + '       g   i     EL$; i  + '       g   i     L; iN)pytestraises	TypeError
ValueErrorr   eyer4   r5   	csr_arrayarangereshaperC   r-   r   s   &r   test_elementwise_rmulrP   {   s    	y	!	!q 
" 
z	"	"
q	ELL**299Q<+?+?1+EFF 
# 661q5aiikAo.////66199;?		q(89:::: 
"	!	! 
#	"s   
EAEE	E,	c                     \         P                  ! W P                  ,          P                  4       V P	                  V P                  4      P                  4       8H  4      '       g   Q hR # rG   )r   rC   Tr-   dotr   s   &r   test_matmulrT      s@    661ss7##%qss););)==>>>>r   c                    \        V ^,          \        P                  P                  4      '       g   Q R4       h\        P
                  ! V ^,          P                  4       V P                  4       ^,          4       \        P                  ! \        RR7      ;_uu_ 4        V ^ ,           RRR4       R#   + '       g   i     R# ; i)rB   r   z
zero power)matchN)
r   r4   r5   r6   nptassert_equalr-   rH   rI   NotImplementedErrorr   s   &r   test_power_operatorrZ      s|    q!tell2233Q5QQ3 ad^^%		a'78 
*,	?	?	1 
@	?	?	?s   
B22C	c                 V    \        W ,          \        P                  4      '       g   Q hR # rG   )r   r   ndarrayr   s   &r   test_sparse_divider]      s    aeRZZ((((r   c                    \         P                  ! \        4      ;_uu_ 4        \        W P	                  4       ,          \
        P                  P                  4      '       g   Q h R R R 4       R #   + '       g   i     R # ; irG   )rH   warnsRuntimeWarningr   r-   r4   r5   r6   r   s   &r   test_sparse_dense_dividera      sE    	n	%	%1yy{?U\\-A-ABBBB 
&	%	%	%s   AA//B 	c                 v    \        V ^,          \        P                  P                  4      '       g   Q R4       hR# )rB   r   Nr?   r   s   &r   test_dense_dividerc      s)    q1uu||3344R6RR4r   c                     \         P                  ! \        4      ;_uu_ 4        V P                   R R R 4       R #   + '       g   i     R # ; irG   )rH   rI   AttributeErrorr   r   s   &r   test_no_A_attrrf      '    	~	&	&	 
'	&	&	&	   :A	c                     \         P                  ! \        4      ;_uu_ 4        V P                   R R R 4       R #   + '       g   i     R # ; irG   )rH   rI   re   Hr   s   &r   test_no_H_attrrk      rg   rh   c                     \        V P                  ^ 4      \        P                  P                  4      '       g   Q h\        V P                  ^ 4      \        P                  P                  4      '       g   Q hR# )r   N)r   _getcolr4   r5   r6   _getrowr   s   &r   test_getrow_getcolro      sL    aiilELL$8$89999aiilELL$8$89999r   c                     \         P                  ! V 4      p\        P                  ! V. RO,          V . RO,          4       R# )r!   Nr!   rB   r   r   )splaaslinearoperatorrW   assert_allclose)r   Ls   & r   test_as_linearoperatorrv      s,    a AL(!l*:;r   c                 r   V P                   P                  R ,          R8w  d   R# \        P                  ! V 4      p\	        V\
        P                  P                  4      '       g   Q h\        P                  ! VP                  4       \        P                  P                  V P                  4       4      4       R# r0   r   N)r2   r3   rr   invr   r4   r5   r6   rW   rt   r-   r   linalgr   Cs   & r   test_invr}      so    {{B5(Aa--....		RYY]]199;%?@r   c                    V P                   P                  R ,          R8w  d   R# \        P                  P	                  V 4      p\
        P                  ! V 4      p\        V\        P                  P                  4      '       g   Q h\        P                  ! VP                  4       \
        P                  ! V4      P                  4       4       R# rx   )r2   r3   r4   r5   
csc_matrixrr   expmr   r6   rW   rt   r-   )r   Bmatr|   s   &  r   	test_expmr      s    {{B5(<<""1%D		!Aa--....					$!r   c           	         V P                   P                  R ,          R8w  d   R# \        P                  ! \        P
                  ! V \        P                  ! ^^.4      4      \        P                  ! V 4      ^^.,          4       R# rx   )	r2   r3   rW   rt   rr   expm_multiplyr   arrayr   r   s   &r   test_expm_multiplyr      s[    {{B5(1bhh1v./		!1vr   c                     \         P                  ! V 4      p\        P                  ! V\        P
                  P                  V P                  4       4      4       R # rG   )rr   normrW   rt   r   rz   r-   )r   r|   s   & r   	test_normr      s2    		!A299>>!))+67r   c                     \         P                  ! V 4      p\        P                  ! V\        P
                  P                  V P                  4       ^4      4       R# r!   N)rr   
onenormestrW   rt   r   rz   r   r-   r{   s   & r   test_onenormestr      s5    A299>>!))+q9:r   c                    V P                   P                  R ,          R9  d   R# \        P                  ! \        P
                  ! V ^^.4      \        P                  P                  V P                  4       ^^.4      4       R# )r0   N)r   r   )
r2   r3   rW   rt   rr   spsolver   rz   solver-   r   s   &r   test_spsolver      sX    {{B~5QA
				aV,r   fmtc                     . RO. RO. RO. RO.pV R8X  d!   \         P                  P                  V4      pM\         P                  P                  V4      p\        P
                  ! V. RO4       R# )r!   r   Nr!   r   r   r   rB   r!   r   r   r   rB   r!   r   r   r   rB   r!   rq   )r4   r5   rM   	csc_arrayrr   spsolve_triangular)r   arrr   s   &  r   test_spsolve_triangularr      sX     		C e|
,,
 
 
%a
,,
 
 
%aA|,r   c                 <   V P                   P                  R ,          R8w  d   R# \        P                  ! V 4      p\        P
                  ! V! \        P                  ! ^^.4      4      \        P                  P                  V P                  4       ^^.4      4       R# rx   )r2   r3   rr   
factorizedrW   rt   r   r   rz   r   r-   )r   LUs   & r   test_factorizedr     si    {{B5(		B
288QF
				aV,r   solverc                     VR 8X  d   / pMRR/p\        \        V4      ! V \        P                  ! ^^.4      3/ VB w  r4V^ 8  g   Q h\        P
                  ! V^^.RR7       R# )minresatolgh㈵>g?r   N)getattrrr   r   r   rW   rt   )r   r   kwargsxinfos   &&   r   test_solversr     sc     $dF#ArxxA'7B6BGA199Aq6-r   lsqrlsmrc                 x    \        \        V4      ! V . RO4      vr#\        P                  ! W,          . RO4       R# )r!   N)r!   rB   r   )r   rr   rW   rt   )r   r   r   _s   &&  r   test_lstsqrr   *  s+     D&!!Y/EAy)r   c                     \         P                  ! V ^R7      w  r\        P                  ! W,          V^ ,          V,          4       R# r!   kN)rr   eigsrW   rt   r   evs   &  r   	test_eigsr   4  s2    99Q!DA		!qr   c                     W P                   ,           p \        P                  ! V ^R7      w  r\        P                  ! W,          V^ ,          V,          4       R# r   )rR   rr   eigshrW   rt   r   s   &  r   
test_eigshr   =  s=    	CCA::a1DA		!qr   c                 2   \         P                  ! V ^R7      w  rp\        P                  P	                  V P                  4       4      w  rEp\        P                  ! V4      p\        P                  ! VR,          4      p\        P                  ! W%RR7       R# )r   r   r0   gMbP?r   N)	rr   svdsr   rz   svdr-   sortrW   rt   )r   usvhu2s2vh2s   &      r   	test_svdsr   G  s`    yya HA"))--		,KBC

A	BBD)r   c                  R   \         P                  P                  . RO. RO. RO. R	O.4      p \        P                  ! V 4      p\
        P                  ! VP                  \        P                  ! . R
O4      4      \        P                  ! . RO\        P                  R7      RRR7       R# r!   r   g+=gMg<)rtolr   Nr   r   r   r   rq   )r4   r5   r   rr   splurW   rt   r   r   r   asarrayfloat64r   r   s     r   	test_splur   P  sp    	  	A 
1B
,'(


<rzz2r   c                  R   \         P                  P                  . RO. RO. RO. R	O.4      p \        P                  ! V 4      p\
        P                  ! VP                  \        P                  ! . R
O4      4      \        P                  ! . RO\        P                  R7      RRR7       R# r   )r4   r5   r   rr   spilurW   rt   r   r   r   r   r   r   s     r   
test_spilur   _  sp    	  	A 
AB
,'(


<rzz2r   zcls,indices_attrsindicesindptrrowcolexpected_dtypec                    \         P                  P                  \        P                  ! ^	4      P                  ^^4      4      pVP                  VP                  P                  V4      VP                  P                  V4      33pV ! V4      pV F  p\        WV4      P                  V8X  d   K  Q h	  V ! VRR7      pV F  p\        WV4      P                  V8X  d   K  Q h	  \        V \         P                  P                  P                  4      '       d   VP                  4       pVP                  VP                   P                  V4      VP"                  P                  V4      3pV ! V4      pV F  p\        WV4      P                  V8X  d   K  Q h	  V ! VRR7      pV F  p\        WV4      P                  V8X  d   K  Q h	  R# R# )	   )r   N)r   r   )r4   r5   	coo_arrayr   rN   rO   datar   astyper   r   r   
issubclass_compressed
_cs_matrixtocsrr   r   )	clsindices_attrsr   input_array	coo_tupleresultattrinput_array_csr	csr_tuples	   &&&      r   test_index_dtype_compressedr   n  s   & ,,((1)=)=a)CDKOO"">2OO"">2	
I ^Fv$**n<<<  &)Fv$**n<<<  #u||//::;;%++-  ##**>:"")).9
	 Y!D6(...@@@ " Yf-!D6(...@@@ " <r   c                      \         P                  P                  . RO4      p \        V \         P                  P                  4      '       d   Q hR# )        N)r         ?       @)r4   r5   diagsr   r6   ms    r   test_default_is_matrix_diagsr     s6    ?+A!U\\1122222r   c                      \         P                  P                  ^4      p \        V \         P                  P                  4      '       d   Q hR# r   N)r4   r5   rL   r   r6   r   s    r   test_default_is_matrix_eyer     s6    A!U\\1122222r   c                      \         P                  P                  . RO^ ^^4      p \        V \         P                  P                  4      '       d   Q hR# )r   N)r   r   g      @)r4   r5   spdiagsr   r6   r   s    r   test_default_is_matrix_spdiagsr     s<    _aA6A!U\\1122222r   c                      \         P                  P                  ^4      p \        V \         P                  P                  4      '       d   Q hR# r   )r4   r5   identityr   r6   r   s    r   test_default_is_matrix_identityr     s6    a A!U\\1122222r   c                     \         P                  P                  \        P                  ! ^^.^^..4      \        P                  ! ^^.^^..4      4      p \        V \         P                  P                  4      '       d   Q hR# r   r4   r5   kronr   r   r   r6   r   s    r   !test_default_is_matrix_kron_denser     i    
1a&1a&!"BHHq!fq!f-=$>	A !U\\1122222r   c                     \         P                  P                  \        P                  ! ^^.^^..4      \        P                  ! ^^ .^ ^ ..4      4      p \        V \         P                  P                  4      '       d   Q hR# r   r   r   s    r   "test_default_is_matrix_kron_sparser     r   r   c                     \         P                  P                  \        P                  ! ^^ .^ ^..4      \        P                  ! ^ ^.^^ ..4      4      p \        V \         P                  P                  4      '       d   Q hR# r   )r4   r5   kronsumr   r   r   r6   r   s    r   test_default_is_matrix_kronsumr    si    
1a&1a&!"BHHq!fq!f-=$>	A !U\\1122222r   c                      \         P                  P                  ^^4      p \        V \         P                  P                  4      '       d   Q hR# r   )r4   r5   r<   r   r6   r   s    r   test_default_is_matrix_randomr    s8    Aq!A!U\\1122222r   c                      \         P                  P                  ^^4      p \        V \         P                  P                  4      '       d   Q hR# r   )r4   r5   randr   r6   r   s    r   test_default_is_matrix_randr    s8    !QA!U\\1122222r   fnc                    \         P                  P                  \        P                  ! ^4      4      p\         P                  P                  ^ ^.^^ ..4      pV ! W.4      p\        V\         P                  P                  4      '       d   Q hR# )z^Same idea as `test_default_construction_fn_matrices`, but for the
stacking creation functions.N)r4   r5   
coo_matrixr   rL   r   r6   )r	  r   r   r   s   &   r   test_default_is_matrix_stacksr    sl     	q	*A!Q!Q 01A
A6
A!U\\1122222r   c                 0   \         P                  P                  \        P                  ! ^4      4      p \         P                  P                  ^.^ ..4      p\         P                  P                  ^..4      p\         P                  P                  WV34      p\        V\         P                  P                  4      '       d   Q h\         P                  P                  V R.RV..4      p\        V\         P                  P                  4      '       d   Q hR# )zYSame idea as `test_default_construction_fn_matrices`, but for the block
creation functionN)	r4   r5   r  r   rL   
block_diagr   r6   bmat)r   r   r|   r   s       r   ,test_blocks_default_construction_fn_matricesr    s     	q	*A!qc
+A!&A 	q	*A!U\\112222 	At9tQi01A!U\\1122222r   c                  H   \          F  p \        \        P                  V  R 24      pV! ^^..4      pVP                  V 8X  g   Q hVP
                  V 8X  g   Q h\        P                  ! \        4      ;_uu_ 4        RVn        RRR4       K  	  R#   + '       g   i     K  ; i)r
   qqqN)	sparray_typesr   r4   r5   format_formatrH   rI   re   )r   arr_clsMs      r   test_format_propertyr    s~    %,,3%v7aVHxx3yyC]]>**AH +* 
 +**s   :BB!c                     \         P                  P                  ^4      p \         P                  P                  V 4      p\	        V \         P                  P
                  4      '       d   Q h\	        V\         P                  P
                  4      '       g   Q h\         P                  P                  V4      '       g   Q h\         P                  P                  V 4      '       g   Q h\         P                  P                  VP                  4       4      '       d   Q h\         P                  P                  V P                  4       4      '       d   Q hR# r   )r4   r5   rL   rM   r   r6   issparser-   r   as     r   test_issparser    s    Aq!A!U\\112222a--.... <<  ####<<  #### ||$$QYY[1111||$$QYY[11111r   c                     \         P                  P                  ^4      p \         P                  P                  V 4      p\	        V \         P                  P
                  4      '       d   Q h\	        V\         P                  P
                  4      '       g   Q h\         P                  P                  V4      '       d   Q h\         P                  P                  V 4      '       g   Q h\         P                  P                  VP                  4       4      '       d   Q h\         P                  P                  V P                  4       4      '       d   Q hR# r   )r4   r5   rL   rM   r   r6   
isspmatrixr-   r  s     r   test_isspmatrixr   	  s    Aq!A!U\\112222a--.... ||&&q))))<<""1%%%% ||&&qyy{3333||&&qyy{33333r   c                    \         P                  P                  ^V R7      p\         P                  P                  V4      P	                  V 4      p\        V\         P                  P                  4      '       d   Q h\        V\         P                  P                  4      '       g   Q hV! V4      '       d   Q hV! V4      '       g   Q hV! VP                  4       4      '       d   Q hV! VP                  4       4      '       d   Q hR# )r   )r  N)r4   r5   rL   rM   asformatr   r6   r-   )r   r	  r   r  s   &&  r   test_isspmatrix_formatr#    s     	3'Aq!**3/A!U\\112222a--.... !uu9a55L5 !))+!))+r   )r   r   r   r   r   r   r	   )r   r!   rB   r   )rB   r   r   r   )r!   r   r   r   )r!   r   r   r!   )rB   r!   rB   r   )r   rB   r!   r   )r   r   r!   rB   )
bicgbicgstabcgcgsgmreslgmresr   qmrgcrotmktfqmr)r   r	  )[rH   numpyr   numpy.testingtestingrW   scipy.sparser4   scipy.sparse.linalgr5   rz   rr   r  r   sparray_classesr   r   r   floatr   sparrayssquare_sparrayseig_sparraysmarkparametrizeparametrize_sparraysparametrize_square_sparraysparametrize_eig_sparraysr   r#   r*   r.   r:   r=   r@   rE   rP   rT   rZ   r]   ra   rc   rf   rk   ro   rv   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rM   r   r   int64int32r   r   r   r   r   r   r   r  r  r  hstackvstackr  r  r  r  r   isspmatrix_bsrisspmatrix_cooisspmatrix_cscisspmatrix_csrisspmatrix_diaisspmatrix_dokisspmatrix_lilr#  )rR   r6   s   00r   <module>rG     s        " " B 2?1>AGELLQCv,' HH  HHFF 
 HH	
 
 '66o7GAJo6-<=_'71:_=*9:/w
/:{{..} /   %kk55m 6   ";;22= 3  
 ' ' % %
 ) )  % %
 B B* J J
 S S = = 	; 	; ? ?   ) ) C C S S  
  
 : : < <
 A A     8 8
 ; ;
   e}-- .-   
. . V*	 
*
     * *  LL""!	

 LL""!	

 LL""EN	
" )BHHbhh+?@ A A#$ AF3
3
3
3
3333
3
  3 3U\\5H5HIJ3 K33 24 	++,	++,	++,	++,	++,	++,	++,u. 7=:s   Q,Q12Q6	Q;