python k c3 a4 c3 a4nteismatriisi

Solutions on MaxInterview for python k c3 a4 c3 a4nteismatriisi by the best coders in the world

showing results for - "python k c3 a4 c3 a4nteismatriisi"
Martina
19 Jan 2017
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.]]