Unverified Commit 0e896a92 authored by Da Zheng's avatar Da Zheng Committed by GitHub
Browse files
parent 53fc6392
......@@ -209,7 +209,7 @@ def metis_partition_assignment(g, k, balance_ntypes=None, balance_edges=False):
nids = F.asnumpy(F.nonzero_1d(balance_ntypes == ntype))
degs = np.zeros((g.number_of_nodes(),), np.int64)
degs[nids] = F.asnumpy(g.in_degrees(nids))
vwgt.append(F.tensor(degs))
vwgt.append(F.zerocopy_from_numpy(degs))
# The vertex weights have to be stored in a vector.
if len(vwgt) > 0:
......
......@@ -1078,7 +1078,7 @@ def metis_partition_assignment(g, k, balance_ntypes=None, balance_edges=False):
nids = F.asnumpy(F.nonzero_1d(balance_ntypes == ntype))
degs = np.zeros((g.number_of_nodes(),), np.int64)
degs[nids] = F.asnumpy(g.in_degrees(nids))
vwgt.append(F.tensor(degs))
vwgt.append(F.zerocopy_from_numpy(degs))
# The vertex weights have to be stored in a vector.
if len(vwgt) > 0:
......
Subproject commit b40908054eac6abeadd46fa55464f0068fc052dc
Subproject commit 62d658c0bcd8dbc8cedf7489fa834403b09382f5
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