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

Function test_nested_arrays

python/pyarrow/tests/test_convert_builtin.py:285–292  ·  view source on GitHub ↗
(seq, inner_seq, factory)

Source from the content-addressed store, hash-verified

283@pytest.mark.parametrize("factory", [
284 pa.list_, pa.large_list, pa.list_view, pa.large_list_view])
285def test_nested_arrays(seq, inner_seq, factory):
286 arr = pa.array(seq([inner_seq([]),
287 inner_seq([1, 2]), None]),
288 type=factory(pa.int64()))
289 assert len(arr) == 3
290 assert arr.null_count == 1
291 assert arr.type == factory(pa.int64())
292 assert arr.to_pylist() == [[], [1, 2], None]
293
294
295@pytest.mark.numpy

Callers

nothing calls this directly

Calls 3

factoryFunction · 0.85
lenFunction · 0.85
arrayMethod · 0.45

Tested by

no test coverage detected