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

Function test_ipc_zero_copy_numpy

python/pyarrow/tests/test_ipc.py:953–966  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

951
952@pytest.mark.pandas
953def test_ipc_zero_copy_numpy():
954 df = pd.DataFrame({'foo': [1.5]})
955
956 batch = pa.RecordBatch.from_pandas(df)
957 sink = pa.BufferOutputStream()
958 write_file(batch, sink)
959 buffer = sink.getvalue()
960 reader = pa.BufferReader(buffer)
961
962 batches = read_file(reader)
963
964 data = batches[0].to_pandas()
965 rdf = pd.DataFrame(data)
966 assert_frame_equal(df, rdf)
967
968
969@pytest.mark.pandas

Callers

nothing calls this directly

Calls 4

write_fileFunction · 0.85
read_fileFunction · 0.85
BufferOutputStreamMethod · 0.80
BufferReaderMethod · 0.80

Tested by

no test coverage detected