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:977–990  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

975
976@pytest.mark.pandas
977def test_ipc_zero_copy_numpy():
978 df = pd.DataFrame({'foo': [1.5]})
979
980 batch = pa.RecordBatch.from_pandas(df)
981 sink = pa.BufferOutputStream()
982 write_file(batch, sink)
983 buffer = sink.getvalue()
984 reader = pa.BufferReader(buffer)
985
986 batches = read_file(reader)
987
988 data = batches[0].to_pandas()
989 rdf = pd.DataFrame(data)
990 assert_frame_equal(df, rdf)
991
992
993@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