Ejemplo n.º 1
0
def test_random():
    a = random((10, 10), chunks=(5, 5))
    assert isinstance(a, Array)
    assert isinstance(a.name, str) and a.name
    assert a.shape == (10, 10)
    assert a.chunks == ((5, 5), (5, 5))

    x = set(np.array(a).flat)

    assert len(x) > 90
Ejemplo n.º 2
0
def test_random():
    a = random((10, 10), chunks=(5, 5))
    assert isinstance(a, Array)
    assert isinstance(a.name, str) and a.name
    assert a.shape == (10, 10)
    assert a.chunks == ((5, 5), (5, 5))

    x = set(np.array(a).flat)

    assert len(x) > 90
Ejemplo n.º 3
0
def test_random():
    a = random((10, 10), blockshape=(5, 5))
    assert isinstance(a, Array)
    assert isinstance(a.name, str) and a.name
    assert a.shape == (10, 10)
    assert a.blockdims == ((5, 5), (5, 5))

    x = set(into(np.ndarray, a).flat)

    assert len(x) > 90
Ejemplo n.º 4
0
def test_unique_names():
    a = random((10, 10), chunks=(5, 5))
    b = random((10, 10), chunks=(5, 5))

    assert a.name != b.name
Ejemplo n.º 5
0
def test_unique_names():
    a = random((10, 10), chunks=(5, 5))
    b = random((10, 10), chunks=(5, 5))

    assert a.name != b.name
Ejemplo n.º 6
0
def test_unique_names():
    a = random((10, 10), blockshape=(5, 5))
    b = random((10, 10), blockshape=(5, 5))

    assert a.name != b.name