Exemple #1
0
def test_horizontal_stack():
    alpha = Space(1)
    beta  = Space(2)

    a = Interval(0,2)
    b = Interval(0,2)

    x = Chart([a,b], alpha)
    y = Chart([a,b], beta)

    # -------------
    s = hstack(x,y)
    # -------------

    block, coords = s[[0,0]]
    assert block == alpha
    assert coords == [0,0]

    block, coords = s[[0,1]]
    assert block == alpha
    assert coords == [0,1]

    block, coords = s[[0,2]]
    assert block == beta
    assert coords == [0,0]

    block, coords = s[[2,4]]
    assert block == beta
    assert coords == [2,2]
Exemple #2
0
def test_multiple_charts():
    alpha = Space(1)
    beta  = Space(2)

    a = Interval(0,2)
    b = Interval(0,2)

    x = Chart([a,b], alpha)
    y = Chart([a,b], beta)

    # -------------
    s = hstack(x,y)