from_sparse6_bytes#

from_sparse6_bytes(string)[源代码]#

从字符串中读取Spare6格式的无向图。

参数
string字符串

稀疏6格式的数据

返回
G
加薪
NetworkXError

如果无法以sparse6格式分析字符串

工具书类

1

Sparse6规范<https://users.cecs.anu.edu.au/~bdm/data/formats.html>

实例

>>> G = nx.from_sparse6_bytes(b":A_")
>>> sorted(G.edges())
[(0, 1), (0, 1), (0, 1)]