pinv

tenpy.linalg.np_conserved.pinv(a, cutoff=1e-15)[source]

Compute the (Moore-Penrose) pseudo-inverse of a matrix.

Equivalent to the following procedure: Perform a SVD, U, S, VH = svd(a, cutoff=cutoff) with a cutoff > 0, calculate P = U * diag(1/S) * VH (with * denoting tensordot) and return P.conj.transpose().

Parameters
a(M, N) Array

Matrix to be pseudo-inverted.

cuttoffloat

Cutoff for small singular values, as given to svd(). (Note: different convetion than numpy.)

Returns
B(N, M) Array

The pseudo-inverse of a.