Unverified Commit aa17d78a authored by Jinjing Zhou's avatar Jinjing Zhou Committed by GitHub
Browse files

Fix (#1478)

parent 97bb85d5
...@@ -75,6 +75,8 @@ class LegacyTUDataset(object): ...@@ -75,6 +75,8 @@ class LegacyTUDataset(object):
try: try:
DS_node_attr = np.loadtxt( DS_node_attr = np.loadtxt(
self._file_path("node_attributes"), delimiter=",") self._file_path("node_attributes"), delimiter=",")
if DS_node_attr.ndim == 1:
DS_node_attr = np.expand_dims(DS_node_attr, -1)
for idxs, g in zip(node_idx_list, self.graph_lists): for idxs, g in zip(node_idx_list, self.graph_lists):
g.ndata['feat'] = DS_node_attr[idxs, :] g.ndata['feat'] = DS_node_attr[idxs, :]
self.data_mode = "node_attr" self.data_mode = "node_attr"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment