netW
import numpy as np
import os
os.chdir('/Users/toshan/dev/pysal/pysal/weights')
from spintW import netW, mat2L
link_list = [('a', 'b'), ('a', 'c'), ('a', 'd'), ('b', 'a'), ('b', 'c'), ('b', 'd'), ('c', 'a'), ('c', 'b'), ('c', 'd'), ('d', 'a'), ('d', 'b'), ('d', 'c')]
w = netW(link_list)
w.full()[0]
w = netW(link_list, share='O')
w.full()[0]
w = netW(link_list, share='D')
w.full()[0]
w = netW(link_list, share='OD')
w.full()[0]
w = netW(link_list, share='C')
w.full()[0]
mat = np.array([[0,1,1],[1,0,1],[1,1,0]])
mat
adjL = mat2L(mat)
adjL
w = netW(adjL, share='C')
w.full()[0]