Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

src/p/y/pysal-HEAD/pysal/network/networkw.py   pysal(Download)
import numpy as np
import pysal as ps
from util import threshold_distance, edge_length, knn_distance
 
 
    neighbors = {}
    for node in wed.node_list:
        neighbors[node] = knn_distance(wed, cost, node, n=n)
    return ps.W(neighbors, id_order=ids)