In [4]:
import sys
sys.path.append('/Users/toshan/dev/pysal/pysal/weights')
from pysal.model.spintW import ODW
import pysal as ps
In [33]:
origins = ps.weights.lat2W(4,4)
dests = ps.weights.lat2W(4,4)
In [34]:
origins.n
Out[34]:
In [35]:
dests.n
Out[35]:
In [36]:
ODw = ODW(origins, dests)
In [37]:
print ODw.n, 16*16
In [38]:
ODw.full()[0].shape
Out[38]:
In [39]:
origins = ps.weights.lat2W(3,3)
In [40]:
dests = ps.weights.lat2W(5,5)
In [41]:
origins.n
Out[41]:
In [42]:
dests.n
Out[42]:
In [43]:
ODw = ODW(origins, dests)
In [44]:
print ODw.n, 9*25
In [45]:
ODw.full()[0].shape
Out[45]:
In [ ]: