9c1978125348ab67190995586175a7d6402bf247,src/BayesianModel/BayesianModel.py,BayesianModel,__init__,#BayesianModel#Any#,31
Before Change
def __init__(self, ebunch=None):
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)
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")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
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: nilmtk/nilmtk
Commit Name: cbe4f084a8be505f8473787e5fce8030a9bd0c09
Time: 2014-05-08
Author: jack-list@xlk.org.uk
File Name: nilmtk/appliancegroup.py
Class Name: ApplianceGroup
Method Name: __init__
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