+
    ,il                     ^    ^ RI t^ RIHtHt ^ RIHtHt R tR t	R t
R tR tR	 tR
 tR tR# )    N)assert_equalassert_array_almost_equal)csgraph	csr_arrayc                      \         P                  ! . RO. RO. RO.4      p \        P                  ! V ^ R7      pW3 F8  p\        P                  ! VRRR7      w  r4\        V^4       \        V. RO4       K:  	  R# )	r   
null_valueTweakdirected
connectionNr      r   r   r   r   r   r   r   )nparrayr   csgraph_from_denseconnected_componentsr   r   )XdeXspXn_componentslabelss        V/usr/lib/python3/dist-packages/scipy/sparse/csgraph/tests/test_connected_components.pytest_weak_connectionsr      so    
((I  C 
$
$SQ
7CX((T4:< 	 	\1%!&)4     c                     \         P                  ! . RO. RO. RO.4      p W P                  ,           p\        P                  ! V ^ R7      p\        P                  ! V^ R7      pW 3 FH  p\        P
                  ! VRRR7      w  rV\        V^4       VP                  4        \        V. RO4       KJ  	  W13 FH  p\        P
                  ! VRRR7      w  rV\        V^4       VP                  4        \        V. R	O4       KJ  	  R# )
r   r   Tstrongr   Nr   r   )r   r      r   )	r   r   Tr   r   r   r   sortr   )X1deX2deX1spX2spr   r   r   s          r   test_strong_connectionsr'      s    88Y  !D &&=D%%dq9D%%dq9DZ((T4<> 	 	\1%!&)4  Z((T4<> 	 	\1%!&)4 r   c            	          \         P                  ! . RO. RO. RO. RO. RO. R	O.4      p \        P                  ! V RRR7      w  r\	        V^4       VP                  4        \        V. R
O4       R# )r   Tr   r   Nr   r   r   r   r   r   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   r   r    r          r   r   r   r   r   r"   r   r   r   r   s      r   test_strong_connections2r1   2   se    
$$$$$$& 	'A 	$$Q08	: L q!
KKMf&89r   c            	          \         P                  ! . RO. RO. RO. RO. RO. R	O.4      p \        P                  ! V RRR7      w  r\	        V^4       VP                  4        \        V. R
O4       R# )r   Tr
   r   Nr)   )r   r   r   r   r   r   r*   r+   r,   )r   r   r   r   r   r   r/   r0   s      r   test_weak_connections2r3   A   se    
$$$$$$& 	'A 	$$Q06	8 L q!
KKMf&89r   c                      \         P                  ! . RO. RO. RO. RO.4      p \        P                  ! V RR7      w  r\	        V^4       \	        V^ ,          V^,          4       \	        V^,          V^,          4       R# )r   r   )r   N)r   r   r   r   )r   r   r   r   )r   r   r   r   )r   r   r   r   )r   r   r   r   r   gr   r   s      r   test_ticket1876r7   P   sg     	,  	!A #77hOLq!F1I&F1I&r   c                  z    \         P                  ! R4      p \        P                  ! V 4      w  r\	        V^4       R# )r.   N)r.   r.   )r   onesr   r   r   r5   s      r   test_fully_connected_graphr:   ^   s.     	A"77:Lq!r   c                  .   \        ^.\        P                  ! ^ .^..\        P                  R7      3RR7      p V P                  P
                  \        P                  8X  g   Q h\        P                  ! V RR7      w  rV^8X  g   Q h\        V^ ^ .4       R# )r   dtypeshapeF)r   Nr    r    	r   r   r   int64indicesr=   r   r   r   r6   nr   s      r   test_int64_indices_undirectedrF   f   ss    A31#s288<=VLA99??bhh&&&,,Q?IA6M6fq!f-r   c                  0   \        ^.\        P                  ! ^ .^..\        P                  R7      3RR7      p V P                  P
                  \        P                  8X  g   Q h\        P                  ! V RRR7      w  rV^8X  g   Q h\        V^^ .4       R# )r   r<   r>   Tr   r   Nr@   rA   rD   s      r   test_int64_indices_directedrH   o   sy    A31#s288<=VLA99??bhh&&&,,Q8@BIA6M6fq!f-r   )numpyr   numpy.testingr   r   scipy.sparser   r   r   r'   r1   r3   r7   r:   rF   rH    r   r   <module>rM      s6     A +5 58::'"..r   