For matrices which are not invertible, the pinv method is returning unstable values (~1e16)
e.g. pinv(DenseMatrix((0.1, 0.1, 0.0), (0.1, 0.1, 0.0), (0.0, 0.0, 0.0))) is giving as result ((5.0952413380206152E16 , -5.0952413380206152E16 , 0.0), (-5.0952413380206168E16, 5.0952413380206168E16, 0.0), (0.0, 0.0, 0.0)).
The result should be something like ((2.5, 2.5, 0.0), (2.5, 2.5, 0), (0.0, 0.0, 0.0))