📜  行列式为 0 的矩阵的逆 python linalg - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:47.832000             🧑  作者: Mango

代码示例1
''' python code '''
import numpy as np
a = np.array([[1., 2.], [3., 4.]])
''' which has a determinant equal to zero '''

a_inverse = np.linalg.pinv(a)
''' method 'pinv' from linalg gives us inverse of the matrix '''