We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5fba4fc + b6b0c43 commit f965367Copy full SHA for f965367
Numpy/LinearAlgebra.py
@@ -4,13 +4,12 @@
4
Domain : Python
5
Author : Ahmedur Rahman Shovon
6
Created : 15 July 2016
7
+Updated : 3 April 2021
8
Problem : https://www.hackerrank.com/challenges/np-linear-algebra/problem
9
'''
-import numpy
10
+
11
+import numpy as np
12
+np.set_printoptions(legacy='1.13')
13
n = int(input())
-ar = []
-for i in range(n):
- tmp = list(map(float,input().split()))
14
- ar.append(tmp)
15
-np_ar = numpy.array(ar,float)
16
-print(numpy.linalg.det(np_ar))
+array = np.array([input().split() for _ in range(n)], float)
+print(np.linalg.det(array))
0 commit comments