示例#1
0
文件: test_dot.py 项目: ogrisel/dask
def test_aliases():
    g = to_networkx({'x': 1, 'y': 'x'})
    assert 'y' in g.edge['x']
示例#2
0
文件: test_dot.py 项目: ogrisel/dask
def test_np_graph():
    g = to_networkx({'x': np.array([[1, 2]])})
    assert g.node['x']['label'] == 'x=[[1 2]]' 
示例#3
0
文件: test_dot.py 项目: ogrisel/dask
def test_to_networkx():
    g = to_networkx(dsk)
    assert isinstance(g, nx.DiGraph)
    assert all(n in g.node for n in ['x', 'a', 'z', 'b', 'y'])