Pseudoinverse
The Moore-Penrose pseudoinverse of a matrix can be computed with the pinv
function of the numpy.linalg
module (visit http://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_pseudoinverse). The pseudoinverse is calculated using the singular value decomposition. The inv
function only accepts square matrices; the pinv
function does not have this restriction.