+
    ,ig                         ^ RI t ^ RIt^ RIHt ^ RIHu Ht ^ RI	H
t
 ^ RIHt  ^ RIt] P                  P                  ]RJ RR7      tRt] P$                  ! R4      ] P$                  ! R] P                  P'                  ]R7      .R	7      3tR
 t] P,                  ! ]R7      R 4       t] P,                  R 4       t] P                  P3                  R]P4                  ]P6                  ]P8                  ]P:                  ]P<                  ]P>                  ]P@                  ]PB                  .4      R 4       t"R t#R t$] P                  P3                  R]PJ                  ]PL                  .4      R 4       t'] P                  P3                  R]PP                  ]PR                  .4      R 4       t*R t+R t,R t-]! R4      ] P                  P3                  R]P4                  ]P6                  ]P8                  ]P:                  ]P<                  ]P\                  .4      ] P                  P3                  R]P^                  ]P`                  3]Pb                  ]Pd                  3.4      R 4       4       4       t3R#   ] d    Rt ELSi ; i)    N)_pep440)assert_equalzpydata/sparse not installedreasonz>pydata/sparse (0.15.1) does not implement necessary operationsCOODOK)marksc                    \         f!   \        P                  P                  RR7      # \        P                  P	                  \
        P                  ! \         P                  4      \
        P                  ! V 4      8  RV  R2R7      # )Nzsparse is not installedr   zsparse version >= z	 required)	sparsepytestmarkskipskipifr   parse__version__Version)min_vers   &O/usr/lib/python3/dist-packages/scipy/sparse/csgraph/tests/test_pydata_sparse.pycheck_sparse_versionr      sh    ~{{'@AA;;f(()GOOG,DD#G9I6       )paramsc                 6    \        \        V P                  4      # N)getattrr   param)requests   &r   
sparse_clsr   #   s    67==))r   c                 f    . RO. RO. RO. RO. RO.p\         P                  ! V4      pV ! V4      pW#3# )r   )r      r   r   r   )r   r   r   r   r   )r   r   r   r   r   )r   r   r   r   r   )nparray)r   graphA_denseA_sparses   &   r   graphsr%   (   s<     	E hhuoG'"Hr   funcc                 l    Vw  r#V ! V4      pV ! \         P                  ! V4      4      p\        WE4       R # r   sp	csc_arrayr   )r&   r%   r#   r$   actualdesireds   &&    r   test_csgraph_equivr-   6   s0     G(^F2<<()G!r   c                     V w  r\         P                  pV! V4      w  rEV! \        P                  ! V4      4      w  rgWF8X  g   Q h\	        WW4       R # r   )spgraphconnected_componentsr)   r*   r   )r%   r#   r$   r&   actual_compactual_labelsdesired_compdesired_labelss   &       r   test_connected_componentsr5   J   sK    G''D!%hK$(g)>$?!L&&&/r   c                    V w  r\        V4      p\        P                  pV! V4      pV! \        P                  ! V4      4      p\        WS4      '       g   Q h\        VP                  4       VP                  4       4       R # r   )typer/   	laplacianr)   r*   
isinstancer   todenser%   r#   r$   r   r&   r+   r,   s   &      r   test_laplacianr<   U   sc    GhJD(^F2<<()Gf))))!7??#45r   c                 p    V w  r#V! V^ 4      pV! \         P                  ! V4      ^ 4      p\        WE4       R# r   Nr(   )r%   r&   r#   r$   r+   r,   s   &&    r   test_order_searchr?   b   s5     G(AF2<<(!,G!r   c                     V w  r#\        V4      pV! V^ 4      pV! \        P                  ! V4      ^ 4      p\        WT4      '       g   Q h\	        VP                  4       VP                  4       4       R# r>   )r7   r)   r*   r9   r   r:   )r%   r&   r#   r$   r   r+   r,   s   &&     r   test_tree_searchrA   n   s_     GhJ(AF2<<(!,Gf))))!7??#45r   c                    V w  r\        V4      p\        P                  pV! V4      pV! \        P                  ! V4      4      p\        WS4      '       g   Q h\        VP                  4       VP                  4       4       R # r   )r7   r/   minimum_spanning_treer)   r*   r9   r   r:   r;   s   &      r   test_minimum_spanning_treerD   }   sc    GhJ((D(^F2<<()Gf))))!7??#45r   c                    V w  r\        V4      p\        P                  pV! V^ ^4      pV! \        P                  ! V4      ^ ^4      pVP
                  VP
                  8X  g   Q h\        VP                  V4      '       g   Q h\        VP                  P                  4       VP                  P                  4       4       R# r>   )
r7   r/   maximum_flowr)   	csr_array
flow_valuer9   flowr   r:   r;   s   &      r   test_maximum_flowrJ      s    GhJD(Aq!F2<<(!Q/G 2 2222fkk:....$$&(<(<(>?r   c                     V w  r\         P                  pV! VR,          4      p\        P                  ! V4      pV! VR,          4      pV! VR,          P	                  4       4      p\        WF4       \        WG4       R# )r      NN)rL   :r      N)r/   "min_weight_full_bipartite_matchingr)   r*   tocoor   )r%   r#   r$   r&   r+   A_cscr,   desired1s   &       r   'test_min_weight_full_bipartite_matchingrS      sg    G55D(8$%FLL!E5?#GE(O))+,H!"r   z0.15.4zfill_value, comp_funcc                    V w  rEVP                  \        4      pW%n        \        V4      pV! V4      pV! \        P
                  ! V4      4      pV\        P                  8X  dc   \        Wv4      '       g   Q hV! VP                  4      '       g   Q hVP                  4       pR Ws! V4      &   \        WxP                  4       4       R# \        Wx4       R# )g        N)astypefloat
fill_valuer7   r)   r*   r/   rC   r9   r:   r   )	r%   r&   rW   	comp_funcr#   r$   r   r+   r,   s	   &&&&     r   test_nonzero_fill_valuerY      s    " Gu%H$hJ(^F2<<()Gw,,,&----**++++!$'y !V__./V%r   )4r   numpyr    scipy.sparser   r)   scipy.sparse.csgraphcsgraphr/   
scipy._libr   numpy.testingr   	Exceptionr   r   
pytestmarkmsgr   xfailsparse_paramsr   fixturer   r%   parametrizeshortest_pathdijkstrafloyd_warshallbellman_fordjohnsonreverse_cuthill_mckeemaximum_bipartite_matchingstructural_rankr-   r5   r<   breadth_first_orderdepth_first_orderr?   breadth_first_treedepth_first_treerA   rD   rJ   rS   rC   infisposinfnanisnanrY    r   r   <module>rx      s      & &  & [[$'D   F
 G e$eFKK,=,=S,=,I+JKM }%* &* 
 
 
%%**	""0
6 
W(('*C*CD"" 
W'')A)AB	6	6
6@
# h
%%
 ffbkkRVVRXX./&	
   &S  Fs   I0 0	I=<I=