python inverse matrix code example
Example 1: inverse matrix python
import numpy as np
X_inverted = numpy.linalg.inv(X)
Example 2: inverse matrix numpy
M_inverse = numpy.linalg.inv(M)
M_inverse = M**(-1)
Example 3: numpy function for calculation inverse of a matrix
inverse = numpy.linalg.inv(x)
Example 4: inverse matrice python
>>> import numpy as np
>>> A = np.array(([1,3,3],[1,4,3],[1,3,4]))
>>> A
array([[1, 3, 3],
[1, 4, 3],
[1, 3, 4]])
>>> A_inv = np.linalg.inv(A)
>>> A_inv
array([[ 7., -3., -3.],
[-1., 1., 0.],
[-1., 0., 1.]])