to_undirected# to_undirected(graph)[source]# 返回图 graph 的一个无向视图。 与 graph.to_undirected(as_view=True) 相同。请注意,graph.to_undirected 默认为 as_view=False,而此函数始终提供一个视图。