Fixed numpy.linalg.LinAlgError: singular matrix
Article directory
Error report
I have encountered this pit in my work before, and record the problem and solution. It may not be applicable to all situations, but it can be used for your reference.
The problem description is as follows:
numpy.linalg.LinAlgError: singular matrix
Solution
Linearity error: Singular matrix. It can be seen that the current matrix is irreversible,
just modify the current matrix so that it is not a singular matrix!
PS
If you have any questions, just leave a message in the comment area