Data Handling

Adj2vec

pygsp.data_handling.adj2vec(G)[source]

Prepare the graph for the gradient computation.

Parameters:G : Graph structure

Mat2vec

pygsp.data_handling.mat2vec(d)[source]

Not implemented yet

Pyramid Cell2coeff

Repmatline

pygsp.data_handling.repmatline(A, ncol=1, nrow=1)[source]

Repeat the matrix A in a specific manner.

Parameters:

A : ndarray

ncol : Integer

default is 1

nrow : Integer

default is 1

Returns:

Ar : Matrix

Examples

For nrow=2 and ncol=3, the matrix

x   =   [1 2 ]
        [3 4 ]

becomes

        [1 1 1 2 2 2 ]
M   =   [1 1 1 2 2 2 ]
        [3 3 3 4 4 4 ]
        [3 3 3 4 4 4 ]
with::
M = np.repeat(np.repeat(x, nrow, axis=1), ncol, axis=0)

Vec2mat

pygsp.data_handling.vec2mat(d, Nf)[source]

Vector to matrix transformation.

Parameters:

d : Ndarray

Data

Nf : int

Number of filter

Returns:

d : list of ndarray

Data