
     it                     H    d Z ddlZddlmZ ddlmZ ddlmZ ddl	m
Z
 d ZdS )z'Test the minimum spanning tree function    N)assert_)	csr_array)minimum_spanning_treec                     g dg dg dg dg dg} t          j        |           } g dg dg dg dg dg}t          j        |          }t          |           }t          |          }|                                }t          j        ||d	           t          j        |                                | d
           t          |d          }t          j        |                                |d           t           j                            d           dD ]}dt           j                            ||f          z   } t          |           }t          |          }t          |j
        |k                t          j        |dz
            }d| ||dz   f<   t          |           }t          |          }t          j        ||f          }d|||dz   f<   t          j        |                                |d	           d S )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   zIncorrect spanning tree found.zOriginal graph was modified.T)	overwritez/Graph was not properly modified to contain MST.i  )r	   
            r   )npasarrayr   r   toarraynptassert_array_equalrandomseedr   nnzarangezeros)graphexpectedcsgraphmintreemintree_arrayNidxs          w/srv/www/vhosts/g4struct/public_html/venv/lib/python3.11/site-packages/scipy/sparse/csgraph/tests/test_spanning_tree.pytest_minimum_spanning_treer!   	   s5    [[[[[[[[[[	E
 JuE 	H
 z(##H G#G,,GOO%%M=(;= = = 7??,,e&( ( ( $Gt<<<G7??,,h9; ; ; INN4 . . BI$$aV,,,E"" (00a    i!nnc#a%iE""'00 8QF## c!ew00(,	. 	. 	. 	.+. .    )__doc__numpyr   numpy.testingr   testingr   scipy.sparser   scipy.sparse.csgraphr   r!    r"   r    <module>r*      sx    - -     ! ! ! ! ! !       " " " " " " 6 6 6 6 6 69. 9. 9. 9. 9.r"   