def __init__(self, ebunch=None):
nodes = []
if ebunch is not None:
nodes = set(itertools.chain(*ebunch))
self._check_node_string(nodes)
nx.Graph.__init__(self, ebunch)
if ebunch is not None:
for node in nodes:
After Change
def __init__(self, ebunch=None):
nx.Graph.__init__(self, ebunch)
if ebunch:
for node in self.nodes():
self._set_is_observed(node, False)
self.factors = []
self.cardinality = {}