Skip to content

Commit 3246352

Browse files
authored
Fix shape of node_weight in METIS (#342)
* update * update
1 parent 14781cb commit 3246352

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/testing.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
4949
- name: Install main package
5050
run: |
51+
pip install scipy
5152
python setup.py develop
5253
env:
5354
WITH_METIS: 1

torch_sparse/metis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def partition(
5252
value = None
5353

5454
if balance_edge:
55-
node_weight = col.new_zeros(col.size(0))
55+
node_weight = col.new_zeros(rowptr.numel() - 1)
5656
node_weight.scatter_add_(0, col, torch.ones_like(col))
5757

5858
if node_weight is not None:

0 commit comments

Comments
 (0)