def knnDistance_fromKnown(knownTransits, new, knn):
    '\n    For a group of known transits and a new one.\n    Use knn to determine how close the new one is to the known transits\n    using knn minkowski p = 3 ()\n    Using scipy signal to do this.\n    '
    nbrs = NearestNeighbors(n_neighbors=int(knn), algorithm='kd_tree', p=2)
    nbrs.fit(knownTransits)
    (distances, indices) = nbrs.kneighbors(new)
    return (distances, indices)
For a group of known transits and a new one.
Use knn to determine how close the new one is to the known transits
using knn minkowski p = 3 ()
Using scipy signal to do this.
def knnDistance_fromKnown(knownTransits, new, knn):
    '\n    For a group of known transits and a new one.\n    Use knn to determine how close the new one is to the known transits\n    using knn minkowski p = 3 ()\n    Using scipy signal to do this.\n    '
    nbrs = NearestNeighbors(n_neighbors=int(knn), algorithm='kd_tree', p=2)
    nbrs.fit(knownTransits)
    (distances, indices) = nbrs.kneighbors(new)
    return (distances, indices)