Utils

Build logger

pygsp.utils.build_logger(name, **kwargs)[source]

Graph array handler

pygsp.utils.graph_array_handler(func)[source]

Filterbank handler

pygsp.utils.filterbank_handler(func)[source]

Sparsifier

pygsp.utils.sparsifier(func)[source]

Distanz

pygsp.utils.distanz(x, y=None)[source]

Calculate the distanz between two colon vectors

Parameters:

x : ndarray

First colon vector

y : ndarray

Second colon vector

Returns:

d : ndarray

Distance between x and y

Examples

>>> import numpy as np
>>> from pygsp import utils
>>> x = np.random.rand(16)
>>> y = np.random.rand(16)
>>> distanz = utils.distanz(x, y)

Full eigen

Resistance distance

pygsp.utils.resistance_distance(M)[source]

Compute the resistance distances of a graph.

Parameters:

M : Graph or sparse matrix

Graph structure or Laplacian matrix (L)

Returns:

rd : sparse matrix

distance matrix

Examples

>>>
>>>
>>>