radius_graph and knn_graph with zero size tensor leads to segmentation fault
maabuu opened this issue · 1 comments
maabuu commented
The following corner case leads to a segmentation fault.
import torch
from torch_cluster import radius_graph
x = torch.rand(0, 3)
radius_graph(x, r=5.0)
The same is true for knn_graph
instead of radius_graph
.
I am on linux and used conda to install python 3.10.8, pytorch 1.13.0 and pytorch_cluster 1.6.0.