mhahsler / dbscan

Density Based Clustering of Applications with Noise (DBSCAN) and Related Algorithms - R package
GNU General Public License v3.0
304 stars 64 forks source link

kNN crashing (segfault) when matrix has Inf values #47

Closed yonatans2 closed 2 years ago

yonatans2 commented 2 years ago

The kNN function gave me a segmentation fault when some of the values were infinite. This was fixed by capping the numbers calculated. Apologies for not reproducing the data/code...

Best, Yonatan

mhahsler commented 2 years ago

I just checked with some data where I set some values to Inf, but I could not replicate the problem. A small sample of your data would be helpful. Do you use a data.frame or distances as input?