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)
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)
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)
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()
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()
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()