| 3957 | def test_array_protocol(): |
| 3958 | |
| 3959 | class MyArray: |
| 3960 | def __init__(self, data): |
| 3961 | self.data = data |
| 3962 | |
| 3963 | def __arrow_array__(self, type=None): |
| 3964 | return pa.array(self.data, type=type) |
| 3965 | |
| 3966 | arr = MyArray(np.array([1, 2, 3], dtype='int64')) |
| 3967 | result = pa.array(arr) |
no outgoing calls