def synteny_liftover(points, anchors, dist):
    from scipy.spatial import cKDTree

    points = np.array(points, dtype=int)
    ppoints = points[:, :2] if points.shape[1] > 2 else points
    tree = cKDTree(anchors, leafsize=16)
    #print tree.data
    dists, idxs = tree.query(ppoints, p=1, distance_upper_bound=dist)

    for point, dist, idx in zip(points, dists, idxs):
        if idx == tree.n:  # nearest is out of range
            continue
        if dist == 0:  # already in anchors
            continue

        yield point, tuple(anchors[idx])
Return the value
dataset/ETHPy150Open tanghaibao/jcvi/compara/synteny.py/synteny_liftover--crossover with--dataset/ETHPy150Open pytent/pytentd/tentd/tests/mock.py/MockFunction.__call__