9c1978125348ab67190995586175a7d6402bf247,src/BayesianModel/BayesianModel.py,BayesianModel,__init__,#BayesianModel#,31

Before Change


            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)

After Change


    
    def __init__(self, ebunch=None):
        if ebunch is not None:
            self._check_node_string(set(itertools.chain(*ebunch)))
            // for edge in ebunch:
            //     if not (isinstance(edge[0], str) and isinstance(edge[1], str)):
            //         raise TypeError("Name of nodes must be strings")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

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: __init__


Project Name: pgmpy/pgmpy
Commit Name: ca25da7c55ba436ab557410d5f2e2e9b557d2840
Time: 2015-03-02
Author: abinash.panda.ece10@itbhu.ac.in
File Name: pgmpy/models/MarkovModel.py
Class Name: MarkovModel
Method Name: to_junction_tree


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