9c1978125348ab67190995586175a7d6402bf247,src/BayesianModel/BayesianModel.py,BayesianModel,add_edges_from,#BayesianModel#Any#,135

Before Change


        >>> G.add_edges_from([("diff", "intel"), ("grade", "intel")])
        
        if ebunch is not None:
            for edge in ebunch:
                if not (isinstance(edge[0], str) and isinstance(edge[1], str)):
                    raise TypeError("Name of nodes must be strings")
                if edge[0] == edge[1]:
                    raise Exceptions.SelfLoopError("Self Loops "
                                                   "are not allowed", edge)

        nx.DiGraph.add_edges_from(self, ebunch)

        new_nodes = set(itertools.chain(*ebunch))
        self._update_node_parents(new_nodes)

After Change


        >>> G.add_edges_from([("diff", "intel"), ("grade", "intel")])
        
        if ebunch is not None:
            self._check_node_string(set(itertools.chain(*ebunch)))

        if self._check_graph(ebunch, delete_graph=False):
            nx.DiGraph.add_edges_from(self, ebunch)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: pgmpy/pgmpy
Commit Name: 9c1978125348ab67190995586175a7d6402bf247
Time: 2013-12-31
Author: ankurankan@gmail.com
File Name: src/BayesianModel/BayesianModel.py
Class Name: BayesianModel
Method Name: add_edges_from


Project Name: biolab/orange3
Commit Name: beeed98974af7fe54028331cb9f5d5d7be8bad2e
Time: 2017-03-10
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/widgets/data/owmergedata.py
Class Name: OWMergeData
Method Name: _set_unique_model


Project Name: biolab/orange3
Commit Name: 94423ec358b2c26a289602d1e5a291d1ee5a4f55
Time: 2012-10-17
Author: anze.staric@gmail.com
File Name: Orange/data/domain.py
Class Name: Domain
Method Name: var_from_domain


Project Name: pgmpy/pgmpy
Commit Name: 9c1978125348ab67190995586175a7d6402bf247
Time: 2013-12-31
Author: ankurankan@gmail.com
File Name: src/BayesianModel/BayesianModel.py
Class Name: BayesianModel
Method Name: __init__