455ea48570f1af63b1270c8ccda49fbe3deb9bcc,python/dgl/graph.py,DGLGraph,from_networkx,#DGLGraph#Any#Any#Any#,1022
Before Change
self._node_frame[attr] = _batcher(attr_dict[attr])
if edge_attrs is not None:
attr_dict = {attr : [] for attr in edge_attrs}
src , dst, _ = self._graph.edges()
for u, v in zip(src.tolist(), dst.tolist()):
for attr in edge_attrs:
attr_dict[attr].append(nx_graph.edges[u, v][attr])
for attr in edge_attrs:
self._edge_frame[attr] = _batcher(attr_dict[attr])
def from_scipy_sparse_matrix(self, a):
After Change
for attr in node_attrs:
self._node_frame[attr] = _batcher(attr_dict[attr])
if edge_attrs is not None:
has_edge_id = "id" in next(iter(nx_graph.edges(data=True)))[-1]
attr_dict = defaultdict(lambda: [None] * self.number_of_edges())
if has_edge_id:
for u, v, attrs in nx_graph.edges(data=True):
for key in edge_attrs:
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 5
Instances Project Name: dmlc/dgl
Commit Name: 455ea48570f1af63b1270c8ccda49fbe3deb9bcc
Time: 2018-12-04
Author: ly979@nyu.edu
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: from_networkx
Project Name: grrrr/nsgt
Commit Name: 6df90a85d495bd7cbb78b3e2af6b0923a29c143f
Time: 2011-11-08
Author: gr@grrrr.org
File Name: nsgt/slicing.py
Class Name:
Method Name: slicing
Project Name: ANSSI-FR/SecuML
Commit Name: 39efccc696a1c20745a52cc50935cdc24f92230d
Time: 2019-05-09
Author: anael.beaugnon@ssi.gouv.fr
File Name: secuml/core/classif/classifiers/__init__.py
Class Name: Classifier
Method Name: _predict_streaming
Project Name: ShangtongZhang/reinforcement-learning-an-introduction
Commit Name: ff8cc9e75f5ddb1473efff36d3f33c092d98391a
Time: 2018-08-05
Author: zhangshangtong.cpp@icloud.com
File Name: chapter01/TicTacToe.py
Class Name: Judger
Method Name: play
Project Name: probcomp/bayeslite
Commit Name: 68a7d5553fa4cef09e0159ac5e100a6424172386
Time: 2015-09-24
Author: gremio@acm.org
File Name: src/metamodels/crosscat.py
Class Name: CrosscatMetamodel
Method Name: create_generator