pysal.lib.weights.mat2L

pysal.lib.weights.mat2L(edge_matrix)[source]

Convert a matrix denoting network connectivity (edges or flows) to a list denoting edges

Parameters:
edge_matrix : array

where rows denote network edge origins, columns denote network edge destinations, and non-zero entries denote the existence of an edge between a given origin and destination

Returns:
edge_list : list

of tuples where each tuple is of the form (o,d) where o is an origin id and d is a destination id