Implement the tolerance parameter for pinv of diagonal matrices