Update knn-grid-impl.py