SciPy

scipy.linalg.interpolative.reconstruct_matrix_from_id

scipy.linalg.interpolative.reconstruct_matrix_from_id(B, idx, proj)[source]

Reconstruct matrix from its ID.

A matrix A with skeleton matrix B and ID indices and coefficients idx and proj, respectively, can be reconstructed as:

numpy.hstack([B, numpy.dot(B, proj)])[:,numpy.argsort(idx)]

See also reconstruct_interp_matrix and reconstruct_skel_matrix.

Parameters:

B : numpy.ndarray

Skeleton matrix.

idx : numpy.ndarray

Column index array.

proj : numpy.ndarray

Interpolation coefficients.

Returns:

numpy.ndarray

Reconstructed matrix.