(ty)
| 637 | None |
| 638 | ]) |
| 639 | def 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 |