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
|
287 Discussions
|
Please Login in order to post a comment
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))
import numpy as np
n = int(input())
arr = []
for _ in range(n): a = [list(map(float, input().split()))] arr.extend(a)
print(round(np.linalg.det(np.array(arr)), 2))