Unverified Commit f5afc6ea authored by Krzysztof Sadowski's avatar Krzysztof Sadowski Committed by GitHub
Browse files

fix rounding issue (#5159)


Co-authored-by: default avatarMufei Li <mufeili1996@gmail.com>
parent 21733e90
...@@ -3508,7 +3508,7 @@ def radius_graph(x, r, p=2, self_loop=False, ...@@ -3508,7 +3508,7 @@ def radius_graph(x, r, p=2, self_loop=False,
distances = th.cdist(x, x, p=p, compute_mode=compute_mode) distances = th.cdist(x, x, p=p, compute_mode=compute_mode)
if not self_loop: if not self_loop:
distances.fill_diagonal_(r + 1e-4) distances.fill_diagonal_(r + 1)
edges = th.nonzero(distances <= r, as_tuple=True) edges = th.nonzero(distances <= r, as_tuple=True)
......
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