def nearest(xc, yc, neighbors, tree):
    """
    Args:
    point (list): list of x, y coordinates of a single center.
    neighbors (int): how many neighbors to look for.
    tree: precomputed spacial.KDtree() of a grid of knots.
    
    Returns: 
    array: indices of the nearest neighbors.
    """
    neighbors = tree.query((xc,yc), k=neighbors)
    return neighbors[1]