Hackerrank Linear Algebra Solution
The NumPy module also comes with a number of built-in routines for linear algebra calculations. These can be found in the sub-module linalg.
linalg.det
The linalg.det tool computes the determinant of an array.
print numpy.linalg.det([[1 , 2], [2, 1]]) #Output : -3.0
linalg.eig
The linalg.