Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
This is a method for adding two simple roots together.
The function takes as input two integers, root1 and root2.
It then uses these integers as keys in the dictionary of
simple roots, and gets the corresponding simple roots, and
then adds them together.

Example
=======
>>> from sympy.liealgebras.root_system import RootSystem
>>> c = RootSystem("A3")(more...)

src/s/y/sympy-0.7.5/sympy/liealgebras/tests/test_root_system.py   sympy(Download)
    assert c.cartan_matrix() == Matrix([[ 2, -1,  0], [-1,  2, -1], [ 0, -1,  2]])
    assert c.dynkin_diagram() == "0---0---0\n1   2   3"
    assert c.add_simple_roots(1, 2) == [1, 0, -1, 0]
    assert c.all_roots() == {1: [1, -1, 0, 0], 2: [1, 0, -1, 0],
            3: [1, 0, 0, -1], 4: [0, 1, -1, 0], 5: [0, 1, 0, -1],