pysal.lib.weights.
full
(w)[source]¶Generate a full numpy array.
Parameters: |
|
---|---|
Returns: |
|
Examples
>>> from pysal.lib.weights import lat2W, W
>>> neighbors = {'first':['second'],'second':['first','third'],'third':['second']}
>>> weights = {'first':[1],'second':[1,1],'third':[1]}
>>> w = W(neighbors, weights)
>>> wf, ids = full(w)
>>> wf
array([[0., 1., 0.],
[1., 0., 1.],
[0., 1., 0.]])
>>> ids
['first', 'second', 'third']