예제 #1
0
def test_text_concat():
    o = text('o')
    n = text('n')
    e = text('e')
    assert o.shape == n.shape
    assert o.shape == e.shape
    assert np.all(concat('w', o, n, e,) == text('one'))
    assert np.all(concat('w', o, n, e,) == text('one'))
예제 #2
0
def test_concat():
    a = np.arange(24).reshape((6,4))
    b = np.arange(24).reshape((6,4))**2
    c = np.arange(24).reshape((6,4))*3
    assert np.all(concat('w', a, concat('w', b, c,)) == concat('w', a, b, c))
    assert np.all(concat('w', concat('w', a, b,), c) == concat('w', a, b, c))
    assert concat('w',a,b).shape == (6,8)
    assert concat('w',a,b,c).shape == (6,12)
예제 #3
0
def test_text_concat():
    o = text('o')
    n = text('n')
    e = text('e')
    assert o.shape == n.shape
    assert o.shape == e.shape
    assert np.all(concat(
        'w',
        o,
        n,
        e,
    ) == text('one'))
    assert np.all(concat(
        'w',
        o,
        n,
        e,
    ) == text('one'))
예제 #4
0
파일: test_concat.py 프로젝트: vck/pymorph
def test_concat():
    a = np.arange(24).reshape((6, 4))
    b = np.arange(24).reshape((6, 4))**2
    c = np.arange(24).reshape((6, 4)) * 3
    assert np.all(concat('w', a, concat(
        'w',
        b,
        c,
    )) == concat('w', a, b, c))
    assert np.all(concat('w', concat(
        'w',
        a,
        b,
    ), c) == concat('w', a, b, c))
    assert concat('w', a, b).shape == (6, 8)
    assert concat('w', a, b, c).shape == (6, 12)