What's the best way to get a list of nearest neighbours for each point in a list of point coordinates? I tried calculating the euclidean distance matrix, but am unsure how to then best get the nearest neighbor for each of the points with this matrix as a starting point...
Thanks Christian. I tried that yesterday and thought it'd always give me the identical spots as nearest neighbors when comparing a point set with itself.
Until I found that you can actually list the two nearest neighbors and then filter for neighbor index==1