Пример #1
0
import matrix

b = [[2,-2,4,2],[2,-1,6,3],[3,-2,12,12],[-1,3,-4,4]]

print matrix.determinant(b) # should be 120

for i in range(50):
    matrix.genExo(i,2)
Пример #2
0
def test_determinant5():
  assert determinant([[10,20,15,11,12], [14,2,10,5,8],[16,2,3,16,14], [8,12,-5,-4,2], [1,8,9,14,15]]) == -410964
Пример #3
0
def test_determinant4():
  assert determinant([[7,12,6,5], [-3,7,-4,2],[5,5,-4,0], [8, 6, 9,3]]) == 308
Пример #4
0
def test_determinant3():
  assert determinant([[3,1, 2], [-2,3, 7], [0, 4, 2]]) == -78
Пример #5
0
def test_determinant2():
  assert determinant([[4, 3],[5, 6]]) == 9
Пример #6
0
def test_determinant1():
  assert determinant([[7]]) == 7