networkx 的 add_node 问题
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'lenovo'
import networkx as nx
G1 = nx.DiGraph
g1 = ['我', '喜欢' , '喜欢' , '自然' , '语言']
n1 = len(g1)
for i in range(n1):
G1.add_node(i, value=g1[i])
提示我TypeError: unbound method add_node() must be called with DiGraph instance as first argument (got int instance instead)
请问应该怎么改呢,我就是想生成一些节点