1# Python NumPy käänteismatriisi
2# Python Inverse Matrix
3# https://numpy.org/doc/stable/reference/generated/numpy.linalg.inv.html
4
5import numpy as np
6
7A = np.array([[5, -1, -3],
8 [2, -1, -1],
9 [-3, 1, 2]])
10
11print(np.linalg.inv(A))
12
13# Result:
14# [[ 1. 1. 2.]
15# [ 1. -1. 1.]
16# [ 1. 2. 3.]]