예제 #1
0
def test_dismbiguate_ignores_uniques():
    x = sdb.ones(4)
    assert disambiguate(x)[0] is x

    y = sdb.afl.build('<x:double>[i=0:3,10,0]', 0).eval()
    z = sdb.afl.build('<y:double>[j=0:3,10,0]', 1).eval()
    assert disambiguate(y, z) == (y, z)
예제 #2
0
def test_dismbiguate_ignores_uniques():
    x = sdb.ones(4)
    assert disambiguate(x)[0] is x

    y = sdb.afl.build('<x:double>[i=0:3,10,0]', 0).eval()
    z = sdb.afl.build('<y:double>[j=0:3,10,0]', 1).eval()
    assert disambiguate(y, z) == (y, z)
예제 #3
0
def test_disambiguate(n):

    arrays = [sdb.ones(4) for _ in range(n)]
    arrays = disambiguate(*arrays)
    visited = set()
    for a in arrays:
        for d in a.dim_names:
            assert d not in visited
            visited.add(d)
        for a in a.att_names:
            assert a not in visited
            visited.add(a)
예제 #4
0
def test_disambiguate(n):

    arrays = [sdb.ones(4) for _ in range(n)]
    arrays = disambiguate(*arrays)
    visited = set()
    for a in arrays:
        for d in a.dim_names:
            assert d not in visited
            visited.add(d)
        for a in a.att_names:
            assert a not in visited
            visited.add(a)