m2m模型翻译
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
524 B

6 months ago
  1. from .cartan_type import CartanType
  2. def CartanMatrix(ct):
  3. """Access the Cartan matrix of a specific Lie algebra
  4. Examples
  5. ========
  6. >>> from sympy.liealgebras.cartan_matrix import CartanMatrix
  7. >>> CartanMatrix("A2")
  8. Matrix([
  9. [ 2, -1],
  10. [-1, 2]])
  11. >>> CartanMatrix(['C', 3])
  12. Matrix([
  13. [ 2, -1, 0],
  14. [-1, 2, -1],
  15. [ 0, -2, 2]])
  16. This method works by returning the Cartan matrix
  17. which corresponds to Cartan type t.
  18. """
  19. return CartanType(ct).cartan_matrix()