I am trying to use this library to solve the all-nearest-neighbors problem in a function I am using, but I am receiving unexpected output from the library. I have attached a codepen showing my process and the output of the codepen is wrong unless I am using this library incorrectly.
Thank you!