tri_to_am#

tri_to_am(tri)[source]#

Given a Delaunay triangulation object from Scipy’s spatial module, converts to a sparse adjacency matrix network representation.

Parameters:

tri (Delaunay Triangulation Object) – This object is produced by scipy.spatial.Delaunay

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.