Deep Learning - SG segmentation/FCN-DenseNet inference/libs/ConcaveHull - ars.py
def GetNearestNeighbors(dataset, point, k):
    ''' Returns indices of k nearest neighbors of point in dataset'''
    # todo: experiment with leafsize for performance
    mytree = spt.KDTree(dataset,leafsize=10)
    distances, indices = mytree.query(point,k)
    # todo: something strange here, we get more indices than points in dataset
    #       so have to do this
    return dataset[indices[:dataset.shape[0]]]
 Returns indices of k nearest neighbors of point in dataset
Returns indices of k nearest neighbors of point in dataset
Returns indices of k nearest neighbors of point in dataset
def GetNearestNeighbors(dataset, point, k):
    mytree = spt.KDTree(dataset,leafsize=10)
    distances, indices = mytree.query(point,k)
    return dataset[indices[:dataset.shape[0]]]
def GetNearestNeighbors ( dataset , point , k ) : mytree = spt . KDTree ( dataset , leafsize = 10 ) distances , indices = mytree . query ( point , k ) return dataset [ indices [ : dataset . shape [ 0 ] ] ]
Returns indices of k nearest neighbors of point in dataset
Returns indices of k nearest neighbors of point in dataset
''' Returns indices of k nearest neighbors of point in dataset''' # todo: experiment with leafsize for performance # todo: something strange here, we get more indices than points in dataset #       so have to do this
dataset
point
k