numpy take inverse of matrix code example
Example 1: inverse matrix python
import numpy as np
# X is the matrix to invert
X_inverted = numpy.linalg.inv(X)
Example 2: numpy function for calculation inverse of a matrix
# python3 inversion of matrix x
inverse = numpy.linalg.inv(x)