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