Пример #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
Пример #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
Пример #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
Пример #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
Пример #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
Пример #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