Compute the Moore-Penrose pseudoinverse of rectangular or singular matrices using singular-value decomposition.