Пример #1
0
def test_into_inplace():
    x = np.arange(600).reshape((20, 30))
    a = into(Array, x, blockshape=(4, 5))
    b = bcolz.zeros(shape=(20, 30), dtype=x.dtype)

    append(b, a, inplace=True)
    assert eq(b[:], x)
Пример #2
0
def test_into_inplace():
    bcolz = pytest.importorskip('bcolz')
    x = np.arange(600).reshape((20, 30))
    a = into(Array, x, blockshape=(4, 5))
    b = bcolz.zeros(shape=(20, 30), dtype=x.dtype)

    append(b, a, inplace=True)
    assert eq(b[:], x)
Пример #3
0
def test_into_inplace():
    bcolz = pytest.importorskip('bcolz')
    x = np.arange(600).reshape((20, 30))
    a = into(Array, x, chunks=(4, 5))
    b = bcolz.zeros(shape=(20, 30), dtype=x.dtype)

    append(b, a, inplace=True)
    assert eq(b[:], x)
Пример #4
0
def test_append_to_array():
    x = np.arange(600).reshape((20, 30))
    a = into(Array, x, blockshape=(4, 5))
    b = bcolz.zeros(shape=(0, 30), dtype=x.dtype)

    append(b, a)
    assert eq(b[:], x)

    with tmpfile('hdf5') as fn:
        h = into(fn+'::/data', a)
        assert eq(h[:], x)
        h.file.close()
Пример #5
0
def test_append_to_array():
    bcolz = pytest.importorskip('bcolz')
    x = np.arange(600).reshape((20, 30))
    a = into(Array, x, blockshape=(4, 5))
    b = bcolz.zeros(shape=(0, 30), dtype=x.dtype)

    append(b, a)
    assert eq(b[:], x)

    with tmpfile('hdf5') as fn:
        h = into(fn+'::/data', a)
        assert eq(h[:], x)
        h.file.close()
Пример #6
0
def test_append_to_array():
    bcolz = pytest.importorskip('bcolz')
    x = np.arange(600).reshape((20, 30))
    a = into(Array, x, chunks=(4, 5))
    b = bcolz.zeros(shape=(0, 30), dtype=x.dtype)

    append(b, a)
    assert eq(b[:], x)

    with tmpfile('.hdf5') as fn:
        h = odo(a, fn + '::/data')
        assert eq(h[:], x)
        h.file.close()