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

Function make_recordbatch

python/pyarrow/tests/test_cuda.py:690–696  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

688
689
690def make_recordbatch(length):
691 schema = pa.schema([pa.field('f0', pa.int16()),
692 pa.field('f1', pa.int16())])
693 a0 = pa.array(np.random.randint(0, 255, size=length, dtype=np.int16))
694 a1 = pa.array(np.random.randint(0, 255, size=length, dtype=np.int16))
695 batch = pa.record_batch([a0, a1], schema=schema)
696 return batch
697
698
699def test_batch_serialize():

Callers 5

test_batch_serializeFunction · 0.85
test_print_arrayFunction · 0.85
make_chunked_arrayFunction · 0.85
test_print_record_batchFunction · 0.85

Calls 3

schemaMethod · 0.45
fieldMethod · 0.45
arrayMethod · 0.45

Tested by

no test coverage detected