Not really a bug, just something that tripped me up for a bit today. I find it a bit strange that kNearest returns an array when the k value is greater than 1, but a non array value when k is set to 1. This seems to create an inconsistency that could become an issue if k is changing over time. Shouldn’t it return an array with one value?
It’s a result of my language side response-parsing code being too clever for its own good (but not quite clver enough, evidently). I’ll see if I can fix it without breaking other stuff.