pygmtools.utilsΒΆ

Functions

build_aff_mat

Build affinity matrix for graph matching from input node/edge features.

build_batch

Build a batched tensor from a list of tensors.

dense_to_sparse

Convert a dense connectivity/adjacency matrix to a sparse connectivity/adjacency matrix and an edge weight tensor.

from_numpy

Convert a numpy ndarray to a tensor.

gaussian_aff_fn

Gaussian kernel affinity function.

inner_prod_aff_fn

Inner product affinity function.

to_numpy

Convert a tensor to a numpy ndarray.