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

Function dlpack_objects

python/pyarrow/tests/test_dlpack.py:239–249  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

237
238
239def dlpack_objects():
240 arr = pa.array([1, 2, 3], type=pa.int32())
241 return [
242 pytest.param(arr, id="array"),
243 pytest.param(arr.slice(1), id="sliced_array"),
244 pytest.param(pa.array([], type=pa.int32()), id="empty_array"),
245 pytest.param(
246 pa.Tensor.from_numpy(np.array([[1, 2], [3, 4]], dtype=np.int32)),
247 id="tensor",
248 ),
249 ]
250
251
252@check_bytes_allocated

Callers

nothing calls this directly

Calls 2

arrayMethod · 0.45
sliceMethod · 0.45

Tested by

no test coverage detected