Skip to content

Commit a6314ec

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3fa47e0 commit a6314ec

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

torch_geometric/utils/_negative_sampling.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ def negative_sampling(
110110
warnings.warn(
111111
'The probability of sampling a negative edge is too low! '
112112
'It could be that the number of sampled edges is smaller '
113-
'than the numbers you required!'
114-
)
113+
'than the numbers you required!')
115114

116115
guess_edge_index, guess_edge_id = sample_almost_k_edges(
117116
size, k, force_undirected=force_undirected,
@@ -303,10 +302,8 @@ def structured_negative_sampling(
303302
neg_col[ok_edges] = col_to_save.view(-1)
304303

305304
if not torch.all(ok_edges):
306-
raise ValueError(
307-
'Sparse method was not able to sample '
308-
'all negative edges requested!'
309-
)
305+
raise ValueError('Sparse method was not able to sample '
306+
'all negative edges requested!')
310307

311308
else:
312309
guess_col, guess_edge_id = sample_k_structured_edges(

0 commit comments

Comments
 (0)