1dc5cec3d5aab66576d18f8a9b8090d8b876e0e1,grakel/kernels/pyramid_match.py,pyramid_match,parse_input,#pyramid_match#Any#,70
Before Change
for x in iter (X) :
if len (x) == 0 :
warnings.warn("Ignoring empty element on index: " +str(i))
if len (x) == 1 :
if type (x) is graph:
A = x.get_adjacency_matrix()
if self._with_labels:
L = x.get_labels(purpose="adjacency" )
else :
if self._with_labels:
warnings.warn(
"Ignoring empty element on index: "
+ str(i) + "\nLabels must be provided." )
else :
A = graph(x[0 ], {}, {}, self._graph_format
).get_adjacency_matrix()
i += 1
elif len (x) in [2, 3]:
x = graph(x[0 ], x[1 ], {}, self._graph_format)
A = x.get_adjacency_matrix()
if self._with_labels:
L = x.get_labels(purpose="adjacency" )
i += 1
else :
raise ValueError ("each element of X must have at least" +
" one and at most 3 elements\n" )
if A.shape[0] == 0 :
Us.append(np.zeros((1 , self._d)))
else :
After Change
if len (x) == 0 :
warnings.warn("Ignoring empty element on index: " +
str(idx))
continue
else :
x = graph(x[0 ], x[1 ], {}, self._graph_format)
elif not type (x) is graph:
raise ValueError ("each element of X must be either a " +
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: ysig/GraKeL
Commit Name: 1dc5cec3d5aab66576d18f8a9b8090d8b876e0e1
Time: 2018-02-01
Author: y.siglidis@gmail.com
File Name: grakel/kernels/pyramid_match.py
Class Name: pyramid_match
Method Name: parse_input
Project Name: pyinstaller/pyinstaller
Commit Name: 98100abde55f1fb0ab455f95b9259c3adcdbab2c
Time: 2015-10-19
Author: h.goebel@crazy-compilers.com
File Name: PyInstaller/building/imphook.py
Class Name: ImportHook
Method Name: _process_excludedimports
Project Name: ysig/GraKeL
Commit Name: 1dc5cec3d5aab66576d18f8a9b8090d8b876e0e1
Time: 2018-02-01
Author: y.siglidis@gmail.com
File Name: grakel/kernels/pyramid_match.py
Class Name: pyramid_match
Method Name: parse_input
Project Name: ysig/GraKeL
Commit Name: 1dc5cec3d5aab66576d18f8a9b8090d8b876e0e1
Time: 2018-02-01
Author: y.siglidis@gmail.com
File Name: grakel/kernels/shortest_path.py
Class Name: shortest_path_attr
Method Name: parse_input