MCPcopy Create free account
hub / github.com/apache/arrow / test_print_array_host

Function test_print_array_host

python/pyarrow/tests/test_cuda.py:978–985  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

976
977@pytest.mark.parametrize("size", [10, 100])
978def test_print_array_host(size):
979 buf = cuda.new_host_buffer(size*8)
980 np_arr = np.frombuffer(buf, dtype=np.int64)
981 np_arr[:] = range(size)
982
983 arr = pa.array(range(size), pa.int64())
984 carr = pa.Array.from_buffers(pa.int64(), size, [None, buf])
985 assert str(carr) == str(arr)
986
987
988def make_chunked_array(n_elements_per_chunk, n_chunks):

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.45

Tested by

no test coverage detected