83025c3d4ad087c1581c8a358333c77e913ca030,torch_geometric/utils/data.py,Data,num_edges,#Data#,28
Before Change
def num_edges(self):
if self.edge_index is not None:
return self.edge_index.size(1)
elif self.edge_attr is not No ne:
return self.edge_attr.size(0)
else:
return None
def cuda(self, *props):
After Change
@property
def num_edges(self):
for _, value in self("edge_attr") :
return value.size(0)
return None if self.edge_index is None else self.edge_index.size(1)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: rusty1s/pytorch_geometric
Commit Name: 83025c3d4ad087c1581c8a358333c77e913ca030
Time: 2018-04-18
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/utils/data.py
Class Name: Data
Method Name: num_edges
Project Name: rusty1s/pytorch_geometric
Commit Name: 83025c3d4ad087c1581c8a358333c77e913ca030
Time: 2018-04-18
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/utils/data.py
Class Name: Data
Method Name: num_nodes
Project Name: masa-su/pixyz
Commit Name: f7be4aa0fe70229549bb74b7e5834517224e5b1f
Time: 2020-08-02
Author: kaneko@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/distributions.py
Class Name: DistGraph
Method Name: sample