# libpysal.weights.mat2L¶

libpysal.weights.mat2L(edge_matrix)[source]

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

Parameters
edge_matrixarray

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_listlist

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