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

Class MyArray2

python/pyarrow/tests/test_array.py:3997–4002  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3995 # ARROW-7066 - allow ChunkedArray output
3996 # GH-33727 - if num_chunks=1 return Array
3997 class MyArray2:
3998 def __init__(self, data):
3999 self.data = data
4000
4001 def __arrow_array__(self, type=None):
4002 return pa.chunked_array([self.data], type=type)
4003
4004 arr = MyArray2(np.array([1, 2, 3], dtype='int64'))
4005 result = pa.array(arr)

Callers 1

test_array_protocolFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_array_protocolFunction · 0.68