pinv: fix the tolerance parameter for diagonal matrices