Skip to content

Commit 2c104c7

Browse files
authored
Implement error check for negative edge weights
Fix flake8 formatting
1 parent d5e4fef commit 2c104c7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

torch_cluster/graclus.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ def graclus_cluster(
4040

4141
if weight is not None:
4242
if (weight < 0).any().item():
43-
raise ValueError(f"PyG's implementation of Graclus clustering "
44-
f"does not support negative edge weights.")
43+
raise ValueError("PyG's implementation of Graclus clustering "
44+
"does not support negative edge weights.")
4545
weight = weight[mask]
4646

4747
# Randomly shuffle nodes.

0 commit comments

Comments
 (0)