We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Numpy
- Linear Algebra
- Discussions
Linear Algebra
Linear Algebra
Sort by
recency
|
289 Discussions
|
Please Login in order to post a comment
code
import numpy as np arr = [] for i in range(int(input())): a = list(map(float, input().split())) arr.append(a)
print(round(np.linalg.det(arr), 2))
import numpy my_arr = [] for _ in range(int(input())): my_arr.append(list(map(float, input().strip().split()))) print(round(numpy.linalg.det(my_arr), 2))
Here's my code:
import numpy n = int(input()) a = ([list(map(float, input().split()))for i in range(n)]) a = numpy.array(a) print(round(numpy.linalg.det(a),2))