Skip to content

Commit 4d1b0c3

Browse files
committed
ignore_same_index false by default
1 parent a17b01b commit 4d1b0c3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/e3tools/_radius.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def radius(
1313
r: float,
1414
batch_x: Int64[Tensor, " N"] | None = None,
1515
batch_y: Int64[Tensor, " M"] | None = None,
16-
ignore_same_index: bool = True,
16+
ignore_same_index: bool = False,
1717
chunk_size: int | None = None,
1818
) -> Int64[Tensor, "2 E"]:
1919
"""For each element in `y` find all points in `x` within distance `r`"""
@@ -79,5 +79,8 @@ def radius_graph(
7979
r: float,
8080
batch: Int64[Tensor, " N"] | None = None,
8181
chunk_size: int | None = None,
82+
loop: bool = False,
8283
) -> Int64[Tensor, "2 E"]:
83-
return radius(x, x, r, batch, batch, ignore_same_index=True, chunk_size=chunk_size)
84+
return radius(
85+
x, x, r, batch, batch, ignore_same_index=not loop, chunk_size=chunk_size
86+
)

0 commit comments

Comments
 (0)