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

Function test_list_from_numpy

python/pyarrow/tests/test_scalars.py:639–644  ·  view source on GitHub ↗
(ty)

Source from the content-addressed store, hash-verified

637 None
638])
639def test_list_from_numpy(ty):
640 s = pa.scalar(np.array([1, 2, 3], dtype=np.int64()), type=ty)
641 if ty is None:
642 ty = pa.list_(pa.int64()) # expected inferred type
643 assert s.type == ty
644 assert s.as_py() == [1, 2, 3]
645
646
647@pytest.mark.pandas

Callers

nothing calls this directly

Calls 3

as_pyMethod · 0.80
scalarMethod · 0.45
arrayMethod · 0.45

Tested by

no test coverage detected