I'm having trouble using the pinv
function from the numpy.linalg
module. I want to invert a rectangular matrix A
:
try:
Binv = np.linalg.pinv(A)
except:
print("an error occurs")
When I run the code no exception is raised, but in my Python prompt the following red text appears: init_dgesdd failed init
.
However when I use my code with other matrices in other contexts (different shapes, different conditioning values...) it works fine.