Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

inverse matrix python numpy

from numpy.linalg import inv
a = np.array([[1., 2.], [3., 4.]])
ainv = inv(a)
np.allclose(np.dot(a, ainv), np.eye(2))
True
np.allclose(np.dot(ainv, a), np.eye(2))
True
Source by numpy.org #
 
PREVIOUS NEXT
Tagged: #inverse #matrix #python #numpy
ADD COMMENT
Topic
Name
7+1 =