Answers for "käänteismatriisi"

0

käänteismatriisi

# Python NumPy käänteismatriisi 
# Python Inverse Matrix
# https://numpy.org/doc/stable/reference/generated/numpy.linalg.inv.html

import numpy as np

A = np.array([[5, -1, -3],
              [2, -1, -1],
              [-3, 1, 2]])

print(np.linalg.inv(A))

# Result:
# [[ 1.  1.  2.]
# [ 1. -1.  1.]
# [ 1.  2.  3.]]
Posted by: Guest on September-15-2021

Python Answers by Framework

Browse Popular Code Answers by Language