I have defined the following function
def pseudo_inverse(mat) :
from scipy import linalg
return matrix(linalg.pinv(mat))
From the eye it works correctly. But if I apply it to
M = matrix(RR,2,3,(1,2,2,4,5,6))
that is
M+=pseudo_inverse(M)
M*M+*M == M
returns False
(when I can see that it is formaly true but not operationaly). I think I understand where is the problem but even in changing the ring ( with the help of the function change_ring()
I cannot obtain the desired identity.