vor_to_am

openpnm.topotools.vor_to_am(vor)[source]

Given a Voronoi tessellation object from Scipy’s spatial module, converts to a sparse adjacency matrix network representation in COO format.

Parameters

vor (Voronoi Tessellation object) – This object is produced by scipy.spatial.Voronoi

Returns

  • A sparse adjacency matrix in COO format. The network is undirected

  • and unweighted, so the adjacency matrix is upper-triangular and all the

  • weights are set to 1.