test_cartan_matrix.py 303 B

12345678910
  1. from sympy.liealgebras.cartan_matrix import CartanMatrix
  2. from sympy.matrices import Matrix
  3. def test_CartanMatrix():
  4. c = CartanMatrix("A3")
  5. m = Matrix(3, 3, [2, -1, 0, -1, 2, -1, 0, -1, 2])
  6. assert c == m
  7. a = CartanMatrix(["G",2])
  8. mt = Matrix(2, 2, [2, -1, -3, 2])
  9. assert a == mt