When searching more neighbours than there are samples in the population, one expects -1 returned indexes and infinite (before nan_to_num) distances. I tested this on empty indexes and it works as expected with a few samples but not above a certain population size:
Hello,
When searching more neighbours than there are samples in the population, one expects
-1
returned indexes and infinite (beforenan_to_num
) distances. I tested this on empty indexes and it works as expected with a few samples but not above a certain population size:With
torch.Tensor
inputs, it starts bugging atn_samples=21
and not20
.May be related to #2135(?)